|
@@ -38,7 +38,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-col :span="6">订单备注</el-col>
|
|
<el-col :span="6">订单备注</el-col>
|
|
- <el-col :span="18" class="other" v-if="info.remarks">{{ info.remarks }}</el-col>
|
|
|
|
|
|
+ <el-col :span="18" class="other" v-if="form.remarks">{{ form.remarks }}</el-col>
|
|
<el-col :span="18" class="other" v-else>暂无备注</el-col>
|
|
<el-col :span="18" class="other" v-else>暂无备注</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
@@ -52,13 +52,28 @@
|
|
<p v-else>¥{{ total_detail.goods_total }}</p>
|
|
<p v-else>¥{{ total_detail.goods_total }}</p>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-col :span="6">下单时间</el-col>
|
|
<el-col :span="6">下单时间</el-col>
|
|
- <el-col :span="18" class="other">{{ info.buy_time }}</el-col>
|
|
|
|
|
|
+ <el-col :span="18" class="other">{{ form.buy_time }}</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-col :span="6">支付时间</el-col>
|
|
<el-col :span="6">支付时间</el-col>
|
|
- <el-col :span="18" class="other">{{ info.pay_time }}</el-col>
|
|
|
|
|
|
+ <el-col :span="18" class="other">{{ form.pay_time }}</el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" v-if="form.status == '1'">
|
|
|
|
+ <el-col :span="6">寄出运单号</el-col>
|
|
|
|
+ <el-col :span="18" class="other">{{ transport.shop_transport_no || '暂无单号' }}</el-col>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="24" v-if="form.status == '1' && !transport.shop_transport_no">
|
|
|
|
+ <el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
|
|
|
|
+ <el-form-item label="寄出运单号" prop="shop_transport_no">
|
|
|
|
+ <el-input v-model="form.shop_transport_no" placeholder="请输入运单号" size="small"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" @click="onSubmit()">保存</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -77,10 +92,11 @@ export default {
|
|
components: {},
|
|
components: {},
|
|
data: function () {
|
|
data: function () {
|
|
return {
|
|
return {
|
|
- info: {},
|
|
|
|
|
|
+ form: {},
|
|
address: {},
|
|
address: {},
|
|
goods_total: 0,
|
|
goods_total: 0,
|
|
shop: {},
|
|
shop: {},
|
|
|
|
+ transport: {},
|
|
list: [],
|
|
list: [],
|
|
total_detail: {},
|
|
total_detail: {},
|
|
typeList: [],
|
|
typeList: [],
|
|
@@ -97,10 +113,13 @@ export default {
|
|
let res;
|
|
let res;
|
|
res = await this.fetch(this.id);
|
|
res = await this.fetch(this.id);
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
- this.$set(this, `info`, res.data);
|
|
|
|
|
|
+ this.$set(this, `form`, res.data);
|
|
// 地址
|
|
// 地址
|
|
this.$set(this, `address`, res.data.address);
|
|
this.$set(this, `address`, res.data.address);
|
|
this.$set(this, `shop`, res.data.shop);
|
|
this.$set(this, `shop`, res.data.shop);
|
|
|
|
+ if (res.data.transport) {
|
|
|
|
+ this.$set(this, `transport`, res.data.transport);
|
|
|
|
+ }
|
|
// 商品
|
|
// 商品
|
|
this.$set(this, `list`, res.data.goods);
|
|
this.$set(this, `list`, res.data.goods);
|
|
// 实付金额
|
|
// 实付金额
|
|
@@ -121,6 +140,21 @@ export default {
|
|
this.$set(this, `goods_total`, goods_total);
|
|
this.$set(this, `goods_total`, goods_total);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 提交
|
|
|
|
+ async onSubmit() {
|
|
|
|
+ let form = this.form;
|
|
|
|
+ let transport = {};
|
|
|
|
+ let res;
|
|
|
|
+ if (form.shop_transport_no) {
|
|
|
|
+ transport.shop_transport_no = form.shop_transport_no;
|
|
|
|
+ form.transport = transport;
|
|
|
|
+ }
|
|
|
|
+ if (form.id) res = await this.update(form);
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$message({ type: `success`, message: `维护信息成功` });
|
|
|
|
+ this.toBack();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 返回
|
|
// 返回
|
|
toBack() {
|
|
toBack() {
|
|
window.history.go('-1');
|
|
window.history.go('-1');
|
|
@@ -131,7 +165,7 @@ export default {
|
|
return this.$route.query.id;
|
|
return this.$route.query.id;
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- metaInfo() {
|
|
|
|
|
|
+ metaform() {
|
|
return { title: this.$route.meta.title };
|
|
return { title: this.$route.meta.title };
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|