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>
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 option from "@/option/basicdata/basicdataDriverArtery";
import {mapGetters} from "vuex";
@ -47,6 +48,7 @@
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { getDetail as getDetailDelineNode } from '@/api/basic/basicDelineNode';
export default {
data() {
return {
@ -154,6 +156,34 @@
viewDisplay: false,
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: "姓名",
prop: "name",
@ -546,8 +576,7 @@
hide: true,
},
]
}
,
},
data: []
};
},
@ -697,7 +726,6 @@
},
onLoad(page, params = {}) {
this.loading = true;
const {
name,
phone,
@ -720,9 +748,12 @@
this.data = data.records;
this.loading = false;
// 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.getpeople();
// getVehicle().then(res => {
// console.log("res.data.data>>>>>>>",res.data.data)
// res.data.data.map(v=>{
@ -752,7 +783,26 @@
label: v.vehicleNub,
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"
style="width: 100%"
: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 v-if="option.index" label="序号" type="index" width="80" align="center">
</el-table-column>
<template v-for="(item,index) in option.column">
<!-- table字段 -->
<el-table-column v-if="item.hide!==true"
@ -92,100 +89,24 @@
width="50%"
:before-close="beforeClose"
append-to-body>
<el-form :disabled="view" :size="option.size" ref="form" :model="form"
label-width="80px">
<el-row>
<el-col :span="11">
<el-form-item label="反馈日期" prop="feedbackTime" label-width="80px">
<el-date-picker v-model="form.feedbackTime" 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="businessDepartment" label-width="120px">
<el-input v-model="form.businessDepartment" 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="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>
<el-table ref="table" v-loading="loading"
@selection-change="selectionChange"
:data="wrapdata"
:height="height"
style="width: 100%"
:border="option.border">
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>
<template v-for="(item,index) in wrapoption.column">
<!-- table字段 -->
<el-table-column v-if="item.hide!==true"
:prop="item.prop"
:label="item.label"
align="center"
:width="item.width"
:key="index">
</el-table-column>
</template>
</el-table>
<!-- 表单按钮 -->
<template #footer>
<span v-if="!view" class="dialog-footer">
@ -199,7 +120,7 @@
</template>
<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 { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
@ -263,7 +184,7 @@ export default {
},
{
label: "收货电话",
prop: "businessDepartment",
prop: "deliveryPhone",
search: true,
width:"100px"
},
@ -275,7 +196,7 @@ export default {
},
{
label: "订单自编号",
prop: "stockArticleId",
prop: "orderIds",
search: true,
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: [],
//
wrapdata:[],
};
},
watch: {
@ -341,23 +305,7 @@ export default {
methods: {
//
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() {
getDictionaryBiz('yes_no').then(res => {
@ -370,10 +318,7 @@ export default {
},
//
handleViewpda() {
let str = {
val: this.propertyformdata.activeTab
}
this.$emit("returnproperty", str);
},
init() {
this.height = this.setPx(document.body.clientHeight - 340);
@ -440,11 +385,13 @@ export default {
});
},
handleView(row) {
console.log("查看>>>>>>>>>>",row);
this.title = '查看';
this.view = true;
this.box = true;
getDetail(row.id).then(res => {
this.form = res.data.data;
getWrapdetail(row.id).then(res => {
console.log("查看>>>>>>>",res.data.data);
// this.wrapdata = res.data.data;
});
},
handleDelete() {

Loading…
Cancel
Save