Commit ba2bf9e9 by ‘巴博尔’

修改

parent 42f2e5b1
...@@ -149,7 +149,12 @@ ...@@ -149,7 +149,12 @@
key="orderStatus" key="orderStatus"
> >
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span v-if="row.orderStatus == 0">待发货</span> <el-button
@click="handleUpdate(row)"
type="text"
v-if="row.orderStatus == 0 && row.toStatus == 1"
>点击发货</el-button
>
<span v-if="row.orderStatus == 1">已发货</span> <span v-if="row.orderStatus == 1">已发货</span>
<span v-if="row.orderStatus == 2">已完成</span> <span v-if="row.orderStatus == 2">已完成</span>
<span v-if="row.orderStatus == 3">退款中</span> <span v-if="row.orderStatus == 3">退款中</span>
...@@ -173,8 +178,8 @@ ...@@ -173,8 +178,8 @@
<el-table-column <el-table-column
label="发货物流" label="发货物流"
align="center" align="center"
prop="logistics" prop="logisticsCode"
key="logistics" key="logisticsCode"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column <el-table-column
...@@ -335,6 +340,36 @@ ...@@ -335,6 +340,36 @@
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<template v-if="openUplate">
<el-dialog
title="发货"
:visible.sync="openUplate"
width="500px"
append-to-body
>
<el-form ref="formh" :model="formh" :rules="rulesh" label-width="80px">
<el-form-item label="物流名称" prop="logistics">
<el-input v-model="formh.logistics" placeholder="请输入物流名称" />
</el-form-item>
<el-form-item label="物流单号" prop="logisticsCode">
<el-input
v-model="formh.logisticsCode"
placeholder="请输入物流单号"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
:loading="buttonLoading"
type="primary"
@click="handleUpdateL(1)"
>确 定</el-button
>
<el-button @click="handleUpdateL(2)">取 消</el-button>
</div>
</el-dialog>
</template>
</div> </div>
</template> </template>
...@@ -351,6 +386,7 @@ export default { ...@@ -351,6 +386,7 @@ export default {
name: "OrderM", name: "OrderM",
data() { data() {
return { return {
openUplate: false,
openArticleInfo: false, openArticleInfo: false,
openArticle: false, openArticle: false,
openArticleTitle: "", openArticleTitle: "",
...@@ -402,6 +438,34 @@ export default { ...@@ -402,6 +438,34 @@ export default {
idcard: "", idcard: "",
isAdult: "", isAdult: "",
}, },
formh: {
logisticsCode: null,
logistics: null,
id: undefined,
},
rulesh: {
id: [
{
required: true,
message: "ID不能为空",
trigger: "blur",
},
],
logisticsCode: [
{
required: true,
message: "物流单号不能为空",
trigger: "blur",
},
],
logistics: [
{
required: true,
message: "物流名称不能为空",
trigger: "blur",
},
],
},
}; };
}, },
created() { created() {
...@@ -433,9 +497,9 @@ export default { ...@@ -433,9 +497,9 @@ export default {
}, },
clickSeeVisitor(row) { clickSeeVisitor(row) {
this.openArticleInfo = true; this.openArticleInfo = true;
console.log(row) console.log(row);
this.VisitorData = row.userAddressVo; this.VisitorData = row.userAddressVo;
console.log(this.VisitorData) console.log(this.VisitorData);
}, },
/** 查询预约陪诊订单列表 */ /** 查询预约陪诊订单列表 */
getList() { getList() {
...@@ -495,17 +559,45 @@ export default { ...@@ -495,17 +559,45 @@ export default {
this.open = true; this.open = true;
this.title = "添加预约陪诊订单"; this.title = "添加预约陪诊订单";
}, },
handleUpdateL(type) {
switch (type) {
case 1:
this.$refs["formh"].validate((valid) => {
if (valid) {
updateOrder({
...this.formh,
orderStatus: 1,
}).then((response) => {
this.$modal.msgSuccess("发货成功");
this.openUplate = false;
this.getList();
});
}
});
break;
case 2:
this.formh = {
logisticsCode: null,
logistics: null,
id: undefined,
};
this.openUplate = false;
break;
}
},
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.loading = true; // this.loading = true;
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getOrder(id).then((response) => { // getOrder(id).then((response) => {
this.loading = false; // this.loading = false;
this.form = response.data; // this.form = response.data;
this.open = true; // this.open = true;
this.title = "修改预约陪诊订单"; // this.title = "修改预约陪诊订单";
}); // });
this.$set(this.formh, "id", id);
this.openUplate = true;
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment