Commit 8f7819e4 by 前端

v1.28.0修改流程

1 parent 0783563a
<template>
<el-cascader
class="el_cascader"
:options="areaList"
v-model="areas"
:props="cascaderProps"
@change="handleAsycChange"
@expand-change="handleAsycChange"
placeholder="请选择"
/>
</template>
<script>
import { getAddress } from "@/api/system";
export default {
name: "AreaCascader",
props: {
value: {
type: Array,
default: () => [],
},
},
data() {
return {
areaList: [],
areas: [],
cascaderProps: {
label: "areaName",
value: "areaCode",
children: "children",
// lazy: true,
// lazyLoad: this.loadProvince,
},
};
},
watch: {
value: {
handler: function (n,o) {
if (n && n != o ) {
this.fillDistrict(n);
this.areas = n;
}
},
immediate: true,
},
},
created() {
this.getList(0);
},
methods: {
// 获取省市区
getList(id) {
let params = {
id: id,
type: "children",
};
let _this = this;
return new Promise((resolve) => {
getAddress(params).then((response) => {
let arr = response.data || [];
arr.map((k) => {
k.children = [];
return k;
});
if (id == 0) {
_this.areaList = arr;
}
resolve(arr);
});
});
},
// 动态加载
async loadProvince(node, resolve) {
console.log("触发加载....");
const { level, data } = node;
if (!node.children || node.children.length <= 0) {
resolve([]);
return false;
}
let res = await this.getList(data ? data.areaCode : 0);
resolve(res);
},
// 省市区
handleAsycChange(val) {
if (val && val.length == 3) {
this.$emit("input", val);
}
var newPro = new Promise((resolve) => {
var riVal = val[val.length - 1];
this.getList(riVal).then((response) => {
this.areaList.map((item) => {
if (item.id == riVal) {
item.children = response;
} else if (item.children && item.children.length > 0) {
// console.log('active item:', response);
item.children.map((citem) => {
if (citem.id == riVal) {
if (val.length < 2) {
citem.children = response;
} else {
response.map((ccitem) => {
ccitem.children = null;
});
citem.children = response;
}
}
});
}
});
resolve();
});
});
return newPro;
},
// 填充省市区
fillDistrict(districtArr) {
if (districtArr.length !== 3) return;
this.handleAsycChange([districtArr[0]]).then(() => {
this.handleAsycChange([districtArr[0], districtArr[1]]).then(() => {});
});
},
},
};
</script>
\ No newline at end of file \ No newline at end of file
...@@ -27,15 +27,15 @@ export default { ...@@ -27,15 +27,15 @@ export default {
label: "areaName", label: "areaName",
value: "areaCode", value: "areaCode",
children: "children", children: "children",
// lazy: true, lazy: true,
// lazyLoad: this.loadProvince, lazyLoad: this.loadProvince,
}, },
}; };
}, },
watch: { watch: {
value: { value: {
handler: function (n) { handler: function (n,o) {
if (n) { if (n && n != o ) {
this.fillDistrict(n); this.fillDistrict(n);
this.areas = n; this.areas = n;
} }
......
...@@ -80,11 +80,9 @@ export default { ...@@ -80,11 +80,9 @@ export default {
value: { value: {
handler: function (n, o) { handler: function (n, o) {
let arr = []; let arr = [];
console.log(n);
if (n && n.length > 0) { if (n && n.length > 0) {
n.map((k) => { n.map((k) => {
let _type = typeof k; let _type = typeof k;
console.log(_type);
if (_type == "string") { if (_type == "string") {
arr.push({ arr.push({
name: k, name: k,
...@@ -146,7 +144,7 @@ export default { ...@@ -146,7 +144,7 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.upload_image_box { .upload_image_box {
display: flex; display: flex;
......
...@@ -4,9 +4,9 @@ var endArr = [] ...@@ -4,9 +4,9 @@ var endArr = []
export const Common = { export const Common = {
// 选则列表 // 选则列表
rowClick: (that, row, col, unclick) => { rowClick: (that, row, col, unclick) => {
console.log(that, 'select that') // console.log(that, 'select that')
console.log(row, 'select row') // console.log(row, 'select row')
console.log(col.target.getAttribute('xx'), 'select col') // console.log(col.target.getAttribute('xx'), 'select col')
if (col && col.target && col.target.attributes && col.target.getAttribute('mytype') == 'btn') { if (col && col.target && col.target.attributes && col.target.getAttribute('mytype') == 'btn') {
return return
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="vhl_gp"> <div class="vhl_gp">
<h3 class="vhl_gp_title">订单管理</h3> <h3 class="vhl_gp_title">订单管理</h3>
<ul class="vhl_list"> <ul class="vhl_list">
<li class="vhl_item" :class="'vhl_item_bg'+i" v-for="(item, i) in orderOpts" :key="i" @click="toCarOrder(item.value)"> <li class="vhl_item" :class="'vhl_item_bg'+i%3" v-for="(item, i) in orderOpts" :key="i" @click="toCarOrder(item.value)">
<span class="vhl_item_label">{{item.label}}</span> <span class="vhl_item_label">{{item.label}}</span>
<span class="vhl_item_num">{{item.number}}</span> <span class="vhl_item_num">{{item.number}}</span>
</li> </li>
...@@ -111,6 +111,11 @@ export default { ...@@ -111,6 +111,11 @@ export default {
{ value: '7', label: '技工已约未装',number: counts.notFinish, }, { value: '7', label: '技工已约未装',number: counts.notFinish, },
{ value: '20', label: '已取消',number: counts.canceled, }, { value: '20', label: '已取消',number: counts.canceled, },
{ value: '8', label: '已完成',number: counts.finished, }, { value: '8', label: '已完成',number: counts.finished, },
// v1.28.0新增tab标签
{ value: "97", label: "待审核", number: counts.notaudit },
{ value: "98", label: "已通过", number: counts.passed },
{ value: "99", label: "被退回", number: counts.rejected },
]; ];
break break
case '1': case '1':
......
...@@ -710,10 +710,8 @@ export default { ...@@ -710,10 +710,8 @@ export default {
// 按钮 事件 // 按钮 事件
listBtnDataFilter(scope) { listBtnDataFilter(scope) {
console.log(this.listBtnDataNoChangeServer);
// v1.28.0版本需求 // v1.28.0版本需求
if (scope.row.auditStatus && scope.row.auditStatus>0) { if (scope.row.auditStatus && scope.row.auditStatus>0) {
console.log(this.getBtnList(scope.row.auditStatus))
return this.getBtnList(scope.row.auditStatus); return this.getBtnList(scope.row.auditStatus);
} }
......
...@@ -389,6 +389,16 @@ export default { ...@@ -389,6 +389,16 @@ export default {
this.addFormVisible = true this.addFormVisible = true
break; break;
case 'send': case 'send':
// v1.28.0版本添加,对于沃尔沃审核中的订单 弹出提示
console.log(undefined == 0)
console.log(null == 0)
if(item.volvoApprovedStatus==0){
this.$message({
type: 'error',
message: '该订单第三方审核中,请稍候再试!'
})
return false;
}
this.sendFormVisible = true this.sendFormVisible = true
this.sendId = item.id this.sendId = item.id
this.receiverInfo = `${item.receiver} ${item.receiverPhone}` this.receiverInfo = `${item.receiver} ${item.receiverPhone}`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!