Browse Source

1.修改司机用户绑定

dev-warehouse
0.0 2 years ago
parent
commit
88ef0e18b1
  1. 60
      src/views/basicdata/driverArtery/basicdataDriverArtery.vue
  2. 193
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue

60
src/views/basicdata/driverArtery/basicdataDriverArtery.vue

@ -38,6 +38,7 @@
<script> <script>
import {getList, getDetail, add, update, remove,getPage} from "@/api/basicdata/basicdataDriverArtery"; import {getList, getDetail, add, update, remove,getPage} from "@/api/basicdata/basicdataDriverArtery";
import { getList as getUserList,getUser} from '@/api/system/user'
import {getVehicle } from "@/api/basicdata/basicdataVehicle"; import {getVehicle } from "@/api/basicdata/basicdataVehicle";
import option from "@/option/basicdata/basicdataDriverArtery"; import option from "@/option/basicdata/basicdataDriverArtery";
import {mapGetters} from "vuex"; import {mapGetters} from "vuex";
@ -47,6 +48,7 @@
import {dateNow} from "@/utils/date"; import {dateNow} from "@/utils/date";
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import 'nprogress/nprogress.css'; import 'nprogress/nprogress.css';
import { getDetail as getDetailDelineNode } from '@/api/basic/basicDelineNode';
export default { export default {
data() { data() {
return { return {
@ -154,6 +156,34 @@
viewDisplay: false, viewDisplay: false,
hide: true, hide: true,
}, },
{
label: "用户",
prop: "userId",
type: "select",
labelWidth:'150',
dicData: [],
width:"100px",
align:'center',
span:11,
hide: true,
filterable: true,
rules: [
{
required: true,
message: '请选择用户',
trigger: 'blur',
},
],
change: (val) => {
if (!!val.value && val.value !== -1){
getUser(val.value).then(res => {
this.form.name =res.data.data.name
this.form.phone =res.data.data.phone
})
}
},
},
{ {
label: "姓名", label: "姓名",
prop: "name", prop: "name",
@ -546,8 +576,7 @@
hide: true, hide: true,
}, },
] ]
} },
,
data: [] data: []
}; };
}, },
@ -697,7 +726,6 @@
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
const { const {
name, name,
phone, phone,
@ -720,9 +748,12 @@
this.data = data.records; this.data = data.records;
this.loading = false; this.loading = false;
// console.log("this.option.column>>>>>>>",this.option.column); // console.log("this.option.column>>>>>>>",this.option.column);
this.option.column[15].dicData =[] this.option.column[16].dicData =[]
this.option.column[9].dicData =[]
// //
this.getVehiclede(); this.getVehiclede();
//
this.getpeople();
// getVehicle().then(res => { // getVehicle().then(res => {
// console.log("res.data.data>>>>>>>",res.data.data) // console.log("res.data.data>>>>>>>",res.data.data)
// res.data.data.map(v=>{ // res.data.data.map(v=>{
@ -752,7 +783,26 @@
label: v.vehicleNub, label: v.vehicleNub,
value: v.id, value: v.id,
} }
this.option.column[15].dicData.push(value) this.option.column[16].dicData.push(value)
})
});
},
//
getpeople(){
getUserList(
1,
100000,
null,
''
).then(res => {
const data = res.data.data;
data.records.map(v=>{
let value =
{
label: v.name,
value: v.id,
}
this.option.column[9].dicData.push(value)
}) })
}); });
} }

193
src/views/distribution/deliverylist/distributionDeliveryListedt.vue

@ -49,10 +49,7 @@
:height="height" :height="height"
style="width: 100%" style="width: 100%"
:border="option.border"> :border="option.border">
<el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column>
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column> <el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>
<el-table-column v-if="option.index" label="序号" type="index" width="80" align="center">
</el-table-column>
<template v-for="(item,index) in option.column"> <template v-for="(item,index) in option.column">
<!-- table字段 --> <!-- table字段 -->
<el-table-column v-if="item.hide!==true" <el-table-column v-if="item.hide!==true"
@ -92,100 +89,24 @@
width="50%" width="50%"
:before-close="beforeClose" :before-close="beforeClose"
append-to-body> append-to-body>
<el-form :disabled="view" :size="option.size" ref="form" :model="form" <el-table ref="table" v-loading="loading"
label-width="80px"> @selection-change="selectionChange"
:data="wrapdata"
<el-row> :height="height"
<el-col :span="11"> style="width: 100%"
<el-form-item label="反馈日期" prop="feedbackTime" label-width="80px"> :border="option.border">
<el-date-picker v-model="form.feedbackTime" placeholder="请输入反馈日期" type="date" value-format="YYYY-MM-DD" <el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>
style="position: absolute;right: 0px;width: 100%"></el-date-picker> <template v-for="(item,index) in wrapoption.column">
</el-form-item> <!-- table字段 -->
</el-col> <el-table-column v-if="item.hide!==true"
<el-col :span="12"> :prop="item.prop"
<el-form-item label="营业部" prop="businessDepartment" label-width="120px"> :label="item.label"
<el-input v-model="form.businessDepartment" placeholder="请输入营业部" align="center"
style="position: absolute;right: 0px;width: 100%" /> :width="item.width"
</el-form-item> :key="index">
</el-col> </el-table-column>
</el-row> </template>
</el-table>
<el-row>
<el-col :span="11">
<el-form-item label="维修公司" prop="maintenanceCompany" label-width="80px">
<el-input v-model="form.maintenanceCompany" placeholder="请输入维修公司"
style="position: absolute;right: 0px;width: 100%" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采买经销商" prop="dealer" label-width="120px">
<el-input v-model="form.dealer" placeholder="请输入采买经销商"
style="position: absolute;right: 0px;width: 100%" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="问题描述" prop="problemDescription" label-width="80px">
<el-input v-model="form.problemDescription" placeholder="请输入问题描述"
style="position: absolute;right: 0px;width: 100%" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否保修期" prop="isLiability" label-width="120px">
<el-select v-model="form.isLiability" clearable placeholder="是否保修期"
style="position: absolute;right: 0px;width: 100%">
<el-option
v-for="item in isLiabilityData"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="寄回日期" prop="returnDate" label-width="80px">
<el-date-picker v-model="form.returnDate" placeholder="请输入寄回日期" type="date" value-format="YYYY-MM-DD"
style="position: absolute;right: 0px;width: 100%"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="寄检修快递单号" prop="repairTrackingNub" label-width="120px">
<el-input v-model="form.repairTrackingNub" placeholder="请输入寄检修快递单号"
style="position: absolute;right: 0px;width: 100%" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="寄回单号" prop="returnOrderNub" label-width="80px">
<el-input v-model="form.returnOrderNub" placeholder="请输入维修寄回单号"
style="position: absolute;right: 0px;width: 100%" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="维修费(元)" prop="maintenanceCosts" label-width="120px">
<el-input v-model="form.maintenanceCosts" placeholder="请输入维修费用;单位(元)" style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="备注" prop="notes">
<el-input v-model="form.notes" placeholder="请输入备注" style="width: 100%" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- 表单按钮 --> <!-- 表单按钮 -->
<template #footer> <template #footer>
<span v-if="!view" class="dialog-footer"> <span v-if="!view" class="dialog-footer">
@ -199,7 +120,7 @@
</template> </template>
<script> <script>
import { getList, getDetail, add, update, remove,getPage,getstatistics } from "@/api/distribution/distributionDeliveryList"; import { getList, getDetail, add, update, remove,getPage,getstatistics,getWrapdetail } from "@/api/distribution/distributionDeliveryList";
import option from '@/option/basic/basicPdarecords'; import option from '@/option/basic/basicPdarecords';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
@ -263,7 +184,7 @@ export default {
}, },
{ {
label: "收货电话", label: "收货电话",
prop: "businessDepartment", prop: "deliveryPhone",
search: true, search: true,
width:"100px" width:"100px"
}, },
@ -275,7 +196,7 @@ export default {
}, },
{ {
label: "订单自编号", label: "订单自编号",
prop: "stockArticleId", prop: "orderIds",
search: true, search: true,
width:"100px" width:"100px"
}, },
@ -299,8 +220,51 @@ export default {
}, },
] ]
}, },
//
wrapoption: {
expand: false,
index: true,
border: true,
selection: true,
column: [
{
label: "包条码",
prop: "packetBarCode",
search: true,
width:"100px"
},
{
label: "一级品类",
prop: "firsts",
search: true,
width:"100px"
},
{
label: "二级品类",
prop: "second",
search: true,
width:"100px"
},
{
label: "三级品类",
prop: "thirdProduct",
search: true,
width:"100px"
},
{
label: "物料名称",
prop: "material",
search: true,
width:"100px"
},
]
},
// //
data: [], data: [],
//
wrapdata:[],
}; };
}, },
watch: { watch: {
@ -341,23 +305,7 @@ export default {
methods: { methods: {
// //
rowUpdate() { rowUpdate() {
this.$refs.myForm.validate(valid => {
if (valid) {
let row = this.dataForm
updatevalue(row).then(() => {
this.$message({
type: "success",
message: "操作成功!"
});
let str = {
val: true
}
this.$emit("returnpda", str);
}, error => {
console.log(error);
});
}
});
}, },
queryDictionary() { queryDictionary() {
getDictionaryBiz('yes_no').then(res => { getDictionaryBiz('yes_no').then(res => {
@ -370,10 +318,7 @@ export default {
}, },
// //
handleViewpda() { handleViewpda() {
let str = {
val: this.propertyformdata.activeTab
}
this.$emit("returnproperty", str);
}, },
init() { init() {
this.height = this.setPx(document.body.clientHeight - 340); this.height = this.setPx(document.body.clientHeight - 340);
@ -440,11 +385,13 @@ export default {
}); });
}, },
handleView(row) { handleView(row) {
console.log("查看>>>>>>>>>>",row);
this.title = '查看'; this.title = '查看';
this.view = true; this.view = true;
this.box = true; this.box = true;
getDetail(row.id).then(res => { getWrapdetail(row.id).then(res => {
this.form = res.data.data; console.log("查看>>>>>>>",res.data.data);
// this.wrapdata = res.data.data;
}); });
}, },
handleDelete() { handleDelete() {

Loading…
Cancel
Save