Browse Source

修改商配修改联系人

fix_bug_pro20231227
caoyizhong 2 years ago
parent
commit
5a4df6fb59
  1. 7
      src/api/distribution/distributionReservation.js
  2. 139
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue

7
src/api/distribution/distributionReservation.js

@ -48,6 +48,13 @@ export const update = (row) => {
data: row
})
}
export const updateReservation = (row) => { //修改用户信息
return request({
url: '/api/logpm-distribution/reservation/updateClient',
method: 'post',
data: row
})
}
/**
* 批量转备货

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

@ -66,6 +66,45 @@
<span>剩余件数{{deliverydata.deliveryNumber - deliverydata.scannedNumber}}</span>
</el-col>
</el-row>
<el-row style="margin-bottom: 1%">
<!-- 列表模块 -->
<el-table
ref="table"
v-loading="loading"
@selection-change="selectionChange"
:data="data"
style="width: 100%"
:border="option.border"
>
<template v-for="(item, index) in option.columnTakeOver">
<!-- table字段 -->
<el-table-column
v-if="item.hide !== true"
:prop="item.prop"
:label="item.label"
:width="item.width"
:key="index"
>
</el-table-column>
</template>
<!-- &lt;!&ndash; 操作栏模块 &ndash;&gt;
<el-table-column prop="menu" label="操作" :width="220" align="center">
<template #="{ row }">
&lt;!&ndash; <el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button>&ndash;&gt;
<el-button
type="primary"
text
icon="el-icon-edit"
@click="handleCallDelivery('3', row)"
>编辑</el-button
>
&lt;!&ndash; <el-button type="primary" text icon="el-icon-delete" @click="rowDel(row)">删除</el-button>&ndash;&gt;
</template>
</el-table-column>-->
</el-table>
</el-row>
<el-divider>订单列表</el-divider>
<!-- <el-row>-->
<!-- <div class="avue-crud__header">-->
@ -101,11 +140,11 @@
</el-table-column>
</template>
<!-- 操作栏模块 -->
<el-table-column prop="menu" label="操作" :width="220" align="center">
<el-table-column prop="menu" label="操作" :width="250" align="center">
<template #="{row}">
<el-button type="primary" text icon="el-icon-view" @click="handleView(row)">
</el-button>
<el-button type="primary" text icon="el-icon-view" @click="handleEdit(row)">
<el-button type="primary" text icon="el-icon-view" @click="handleCallDelivery('3', row)"> 辑收货人信息
</el-button>
<!-- <el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button>-->
<el-button type="primary" text icon="el-icon-view" @click="handleOne(row)"
@ -233,6 +272,31 @@
<!-- </el-pagination>-->
</div>
</el-row>
<el-dialog v-model="dialogFormCustomer" title="修改客户信息">
<el-form :model="formCustomer">
<el-form-item label="姓名" :label-width="formLabelWidth">
<el-input v-model="formCustomer.consignee" autocomplete="off" />
</el-form-item>
<el-form-item label="电话" :label-width="formLabelWidth">
<el-input v-model="formCustomer.deliveryPhone" autocomplete="off" />
</el-form-item>
<el-form-item label="地址" :label-width="formLabelWidth">
<el-input
v-model="formCustomer.deliveryAddress"
:rows="2"
type="textarea"
placeholder="请填写地址"
/>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogFormCustomer = false">取消</el-button>
<!-- <el-button type="primary" @click="dialogFormVisible = false"> 确定 </el-button>-->
<el-button type="primary" @click="callFordelivery('3')"> 确定 </el-button>
</span>
</template>
</el-dialog>
<!-- 表单模块 -->
<el-dialog :title="title"
v-model="box"
@ -319,6 +383,7 @@
import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
import dayjs from 'dayjs';
import { updateReservation } from '@/api/distribution/distributionReservation';
export default {
data() {
@ -358,8 +423,11 @@
view: false,
//
signView: false,
dialogFormCustomer: false,
//
query: {},
formCustomer: {},
formLabelWidth: '120px',
inputTypeData: [],
//
page: {
@ -456,7 +524,32 @@
search: true,
width: '100px'
}
]
],
columnTakeOver: [
{
label: '订单自编号',
prop: 'orderIds',
search: true,
},
{
label: '收货人',
prop: 'consignee',
search: true,
},
{
label: '收货电话',
prop: 'deliveryPhone',
search: true,
},
{
label: '收货地址',
prop: 'deliveryAddress',
search: true,
},
],
},
//
@ -873,10 +966,50 @@
}
},
methods: {
callFordelivery(){
console.log("提交的数据》》》",this.formCustomer);
updateReservation(this.formCustomer).then(res =>{
console.log("返回的数据",res.data.data);
this.selectionClear();
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!'
});
})
this.dialogFormCustomer = false;
},
handleCallDelivery(ind, row) {
switch (ind) {
case '1':
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.orderCode);
});
this.formCall.waybill = ids;
this.dialogFormVisible = true;
break;
case '2':
this.dialogFormService = true;
break;
case '3':
this.dialogFormCustomer = true;
console.log('<><>', row);
this.formCustomer.id = row.id ;
this.formCustomer.consignee = row.consignee;
this.formCustomer.deliveryPhone = row.deliveryPhone;
this.formCustomer.deliveryAddress = row.deliveryAddress;
break;
}
},
beforeOpen(done, type) {
if (['edit', 'view'].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();

Loading…
Cancel
Save