|
@@ -169,6 +169,7 @@
|
|
<el-button v-permission="['GET /admin/order/ishandle']" type="text" icon="el-icon-circle-plus-outline" size="mini" @click="handleContactCus(scope.row)">
|
|
<el-button v-permission="['GET /admin/order/ishandle']" type="text" icon="el-icon-circle-plus-outline" size="mini" @click="handleContactCus(scope.row)">
|
|
{{scope.row.isHandle?'未处理':'已处理'}}
|
|
{{scope.row.isHandle?'未处理':'已处理'}}
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button v-permission="['POST /admin/order/updateOrderAddress']" v-show="scope.row.orderStatus ==201" type="text" icon="el-icon-edit" size="mini" @click="updateOrderAddress(scope.row)">修改地址</el-button>
|
|
|
|
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -590,6 +591,49 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 修改地址 -->
|
|
|
|
+ <el-dialog :visible.sync="updateAddressVisible" title="修改地址" width="660px" center>
|
|
|
|
+ <el-form ref="updateAddressForm" :model="updateAddressForm" :rules="updateAddressFormRules" status-icon label-position="left" label-width="200px" style=" padding:10px 30px">
|
|
|
|
+
|
|
|
|
+ <el-row :gutter="60">
|
|
|
|
+
|
|
|
|
+ <el-form-item label="省市区" prop="area">
|
|
|
|
+ <el-cascader style="width:100%" :options="areaList" v-model="updateAddressForm.area" ref="cascader1" @change="handleUpdateAreaChange" clearable></el-cascader>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="60">
|
|
|
|
+ <el-form-item label="服务地址" prop="addressDetail">
|
|
|
|
+ <el-input v-model="updateAddressForm.addressDetail" clearable />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ <el-row :gutter="60">
|
|
|
|
+
|
|
|
|
+ <el-form-item label="是否取消已预约未服务工单" prop="cancelBookOrderDetail">
|
|
|
|
+ <!-- <el-select v-model="updateAddressForm.cancelBookOrderDetail" style="width:100%" placeholder="请选择支付渠道">
|
|
|
|
+
|
|
|
|
+ <el-option label="是" value="1" />
|
|
|
|
+ <el-option label="否" value="0" />
|
|
|
|
+ </el-select> -->
|
|
|
|
+ <el-radio-group v-model="updateAddressForm.cancelBookOrderDetail">
|
|
|
|
+ <el-radio label="1">是</el-radio>
|
|
|
|
+ <el-radio label="0">否</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="updateAddressVisible = false">取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="confirmUpdateAddress">确定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<el-dialog :visible.sync="showbaogangRefund" title="外部订单退还(口碑/宝钢)" width="900px" center>
|
|
<el-dialog :visible.sync="showbaogangRefund" title="外部订单退还(口碑/宝钢)" width="900px" center>
|
|
<el-form>
|
|
<el-form>
|
|
<el-row :gutter="60">
|
|
<el-row :gutter="60">
|
|
@@ -812,6 +856,7 @@ import {
|
|
orderBookDetail,
|
|
orderBookDetail,
|
|
orderIsHandle,
|
|
orderIsHandle,
|
|
orderBookReassign,
|
|
orderBookReassign,
|
|
|
|
+ updateOrderAddress
|
|
} from "@/api/order";
|
|
} from "@/api/order";
|
|
import { allChannel } from "@/api/channel";
|
|
import { allChannel } from "@/api/channel";
|
|
import { send, getSmsTemplate } from "@/api/sms";
|
|
import { send, getSmsTemplate } from "@/api/sms";
|
|
@@ -1207,6 +1252,30 @@ export default {
|
|
{ required: true, message: "请输入接收手机号", trigger: "change" },
|
|
{ required: true, message: "请输入接收手机号", trigger: "change" },
|
|
],
|
|
],
|
|
},
|
|
},
|
|
|
|
+ updateAddressVisible:false,
|
|
|
|
+ updateAddressForm:{
|
|
|
|
+ area:'',
|
|
|
|
+ addressDetail:'',
|
|
|
|
+ cancelBookOrderDetail:''
|
|
|
|
+ },
|
|
|
|
+ updateOrderInfo:{},
|
|
|
|
+ updateAddressFormRules: {
|
|
|
|
+
|
|
|
|
+ area: [{ required: true, message: "请选择省市区", trigger: "change" }],
|
|
|
|
+ addressDetail: [
|
|
|
|
+ { required: true, message: "请输入客户地址", trigger: "blur" },
|
|
|
|
+ ],
|
|
|
|
+ goodsId: [{ required: true, message: "请选择商品", trigger: "change" }],
|
|
|
|
+
|
|
|
|
+ cancelBookOrderDetail: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: "是否取消已预约未服务工单",
|
|
|
|
+ trigger: "blur",
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
@@ -2323,6 +2392,114 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ updateOrderAddress(row){
|
|
|
|
+ this.updateAddressVisible=true;
|
|
|
|
+ this.updateOrderInfo=row;
|
|
|
|
+ this.updateAddressForm={
|
|
|
|
+ area:'',
|
|
|
|
+ addressDetail:(row.address.split(' '))[1],
|
|
|
|
+ cancelBookOrderDetail:'',
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ confirmUpdateAddress(){
|
|
|
|
+ this.$refs["updateAddressForm"].validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ // this.$confirm("确定要修改吗?", "提示", {
|
|
|
|
+ // confirmButtonText: "确定",
|
|
|
|
+ // cancelButtonText: "取消",
|
|
|
|
+ // type: "warning",
|
|
|
|
+ // }).then(() => {
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
+ lock: true,
|
|
|
|
+ text: "提交中...",
|
|
|
|
+ spinner: "el-icon-loading",
|
|
|
|
+ background: "rgba(0, 0, 0, 0.5)",
|
|
|
|
+ });
|
|
|
|
+// {
|
|
|
|
+// "addressDto": {
|
|
|
|
+// "addressDetail": "string",
|
|
|
|
+// "areaCode": "string",
|
|
|
|
+// "city": "string",
|
|
|
|
+// "county": "string",
|
|
|
|
+// "lat": "string",
|
|
|
|
+// "lng": "string",
|
|
|
|
+// "name": "string",
|
|
|
|
+// "province": "string",
|
|
|
|
+// "shopId": 0,
|
|
|
|
+// "tel": "string",
|
|
|
|
+// "userId": 0
|
|
|
|
+// },
|
|
|
|
+// "cancelBookOrderDetail": 0,
|
|
|
|
+// "orderId": 0
|
|
|
|
+// }
|
|
|
|
+ updateOrderAddress({
|
|
|
|
+ addressDto: {
|
|
|
|
+ addressDetail: this.updateAddressForm.addressDetail,
|
|
|
|
+ areaCode: this.updateAddressForm.areaCode,
|
|
|
|
+ city: this.updateAddressForm.city,
|
|
|
|
+ county: this.updateAddressForm.county,
|
|
|
|
+ province: this.updateAddressForm.province,
|
|
|
|
+ },
|
|
|
|
+ orderId:this.updateOrderInfo.id,
|
|
|
|
+ cancelBookOrderDetail:this.updateAddressForm.cancelBookOrderDetail,
|
|
|
|
+ // customerName: this.orderInputForm.customerName,
|
|
|
|
+ // goodsId: this.orderInputForm.goodsId,
|
|
|
|
+ // message: this.orderInputForm.message,
|
|
|
|
+ // orderChannel: this.orderInputForm.orderChannel,
|
|
|
|
+ // orderPrice: this.orderInputForm.orderPrice,
|
|
|
|
+ // tel: this.orderInputForm.tel,
|
|
|
|
+ // payId: this.orderInputForm.payId,
|
|
|
|
+ // payTime: this.orderInputForm.payTime,
|
|
|
|
+ // payChannel: this.orderInputForm.payChannel,
|
|
|
|
+ // orderType: this.orderInputForm.orderType,
|
|
|
|
+ })
|
|
|
|
+ .then((response) => {
|
|
|
|
+ loading.close();
|
|
|
|
+ this.updateAddressVisible= false;
|
|
|
|
+ this.$notify.success({
|
|
|
|
+ title: "成功",
|
|
|
|
+ message: "修改成功",
|
|
|
|
+ });
|
|
|
|
+ this.getList();
|
|
|
|
+ })
|
|
|
|
+ .catch((response) => {
|
|
|
|
+ loading.close();
|
|
|
|
+ this.$notify.error({
|
|
|
|
+ title: "修改失败",
|
|
|
|
+ message: response.data.errmsg,
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ // });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handleUpdateAreaChange(value) {
|
|
|
|
+ console.log(value);
|
|
|
|
+ console.log(this.updateAddressForm.area == "");
|
|
|
|
+ let node = this.$refs["cascader1"].getCheckedNodes();
|
|
|
|
+ console.log(node);
|
|
|
|
+ if (node.length > 0) {
|
|
|
|
+ console.log(node[0].path, node[0].pathLabels);
|
|
|
|
+ this.updateAddressForm.areaCode = node[0].path[2];
|
|
|
|
+ this.updateAddressForm.province = node[0].pathLabels[0];
|
|
|
|
+ this.updateAddressForm.city = node[0].pathLabels[1];
|
|
|
|
+ this.updateAddressForm.county = node[0].pathLabels[2];
|
|
|
|
+ if (
|
|
|
|
+ node[0].pathLabels[2] == "市辖区" &&
|
|
|
|
+ node[0].pathLabels[0] != "北京市" &&
|
|
|
|
+ node[0].pathLabels[0] != "上海市" &&
|
|
|
|
+ node[0].pathLabels[0] != "重庆市" &&
|
|
|
|
+ node[0].pathLabels[0] != "天津市"
|
|
|
|
+ ) {
|
|
|
|
+ this.$notify.error({
|
|
|
|
+ title: "请选择具体区域",
|
|
|
|
+ });
|
|
|
|
+ this.updateAddressForm.area = "";
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|