|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<template> |
|
|
|
|
<basic-container> |
|
|
|
|
<basic-container v-loading="loadingObj.pageLoading"> |
|
|
|
|
<div class="avue-crud"> |
|
|
|
|
<!-- 搜索模块 --> |
|
|
|
|
<div v-h5uShow="!search"> |
|
|
|
@ -125,83 +125,11 @@
|
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<!-- 新增节点 --> |
|
|
|
|
<el-dialog |
|
|
|
|
title="新增节点" |
|
|
|
|
v-model="popUpShow.addNewNodeVisited" |
|
|
|
|
width="50%" |
|
|
|
|
:before-close="beforeClose" |
|
|
|
|
append-to-body |
|
|
|
|
> |
|
|
|
|
<el-form |
|
|
|
|
:disabled="view" |
|
|
|
|
ref="form" |
|
|
|
|
:model="addLineInfo.addLineForm" |
|
|
|
|
label-width="80px" |
|
|
|
|
style="zoom: 0.9" |
|
|
|
|
> |
|
|
|
|
<!-- 表单字段 --> |
|
|
|
|
<el-form-item label="提货客户" prop="pickUpTime"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.customerCode" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
reserve-keyword |
|
|
|
|
remote-show-suffix |
|
|
|
|
:remote-method="remoteCodeMethod" |
|
|
|
|
:loading="loading" |
|
|
|
|
@change="getMenDian($event, 2)" |
|
|
|
|
placeholder="请输入内容" |
|
|
|
|
:teleported="false" |
|
|
|
|
placement="bottom-end" |
|
|
|
|
class="popUpselect" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in options" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.code" |
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="联系人" prop="pickUpTime"> |
|
|
|
|
<el-input v-model="form.pickUpTime" type="text" placeholder="联系人" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="联系方式" prop="pickUpTime"> |
|
|
|
|
<el-input v-model="form.pickUpTime" type="text" placeholder="联系方式" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="提货地址" prop="pickUpTime"> |
|
|
|
|
<el-input v-model="form.pickUpTime" type="text" placeholder="提货地址" /> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
<el-form-item label="提货地址" prop="pickUpTime"> |
|
|
|
|
<avue-input-map |
|
|
|
|
:params="addNewNodeInfo.params" |
|
|
|
|
placeholder="请选择地图" |
|
|
|
|
v-model="addNewNodeInfo.map" |
|
|
|
|
></avue-input-map> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="备注" prop="pickUpTime"> |
|
|
|
|
<el-input v-model="form.pickUpTime" type="textarea" placeholde="备注" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<!-- 表单按钮 --> |
|
|
|
|
<template #footer> |
|
|
|
|
<span v-if="!view" class="dialog-footer"> |
|
|
|
|
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit" |
|
|
|
|
>提 交</el-button |
|
|
|
|
> |
|
|
|
|
<el-button icon="el-icon-circle-close" @click="popUpShow.addNewNodeVisited = false" |
|
|
|
|
>取 消</el-button |
|
|
|
|
> |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 添加提货数据 --> |
|
|
|
|
<el-dialog |
|
|
|
|
:title="title" |
|
|
|
|
v-model="popUpShow.addDistrilbutionVisited" |
|
|
|
|
width="50%" |
|
|
|
|
width="780px" |
|
|
|
|
:before-close="beforeClose" |
|
|
|
|
append-to-body |
|
|
|
|
> |
|
|
|
@ -210,50 +138,65 @@
|
|
|
|
|
<el-form-item label="运单号" prop="clientId"> |
|
|
|
|
<!-- <el-input v-model="form.customerName" placeholder="请输入客户名称"/>--> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.clientId" |
|
|
|
|
class="w100" |
|
|
|
|
v-model="form.waybillNo" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
reserve-keyword |
|
|
|
|
remote-show-suffix |
|
|
|
|
:remote-method="remoteMethod" |
|
|
|
|
@change="handleChooseWaybillNo" |
|
|
|
|
:loading="loading" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入运单号" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in options" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
:key="item.waybillNo" |
|
|
|
|
:label="item.waybillNo" |
|
|
|
|
:value="item.waybillNo" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="开单日期" prop="consignee"> |
|
|
|
|
<el-input v-model="form.consignee" placeholder="请输入提货人" /> |
|
|
|
|
<el-form-item label="开单日期" prop="createTime"> |
|
|
|
|
<el-date-picker |
|
|
|
|
class="w100 h100" |
|
|
|
|
v-model="form.createTime" |
|
|
|
|
type="date" |
|
|
|
|
placeholder="请选择开单日期" |
|
|
|
|
value-format="YYYY-MM-DD" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="货物名称" prop="pickUpPlate"> |
|
|
|
|
<el-input v-model="form.pickUpPlate" placeholder="请输入货物名称" /> |
|
|
|
|
<el-form-item label="货物名称" prop="goodsName"> |
|
|
|
|
<el-input v-model="form.goodsName" placeholder="请输入货物名称" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="提货件数" prop="deliveryDocument"> |
|
|
|
|
<el-input-number v-model="form.deliveryDocument" :min="1" :max="10" /> |
|
|
|
|
<el-form-item label="提货件数" prop="num"> |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="form.num" |
|
|
|
|
class="w100" |
|
|
|
|
:min="0" |
|
|
|
|
:max="form.maxNum || form.maxNum === 0 || Infinity" |
|
|
|
|
:value-on-clear="0" |
|
|
|
|
controls-position="right" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="到站" prop="deliveryDocument"> |
|
|
|
|
<el-input v-model="form.deliveryDocument" placeholder="请输入提货证件" /> |
|
|
|
|
<el-form-item label="到站" prop="destination"> |
|
|
|
|
<el-input v-model="form.destination" placeholder="请输入提货证件" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="发货人" prop="pickUpTime"> |
|
|
|
|
<el-input v-model="form.pickUpTime" placeholder="请输入发货人" /> |
|
|
|
|
<el-form-item label="发货人" prop="shipperName"> |
|
|
|
|
<el-input v-model="form.shipperName" placeholder="请输入发货人" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="发货手机" prop="consignee"> |
|
|
|
|
<el-input v-model="form.consignee" placeholder="请输入发货手机" /> |
|
|
|
|
<el-form-item label="发货手机" prop="shipperMobile"> |
|
|
|
|
<el-input v-model="form.shipperMobile" placeholder="请输入发货手机" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="收货电话" prop="pickUpPlate"> |
|
|
|
|
<el-input v-model="form.pickUpPlate" placeholder="请输入收货电话" /> |
|
|
|
|
<el-form-item label="收货电话" prop="consigneeMobile"> |
|
|
|
|
<el-input v-model="form.consigneeMobile" placeholder="请输入收货电话" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="支付方式" prop="deliveryDocument"> |
|
|
|
|
<el-input v-model="form.deliveryDocument" placeholder="请输入支付方式" /> |
|
|
|
|
<el-form-item label="支付方式" prop="payType"> |
|
|
|
|
<el-input v-model="form.payType" placeholder="请输入支付方式" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="备注" prop="deliveryDocument"> |
|
|
|
|
<el-input v-model="form.deliveryDocument" type="textarea" placeholder="请输入备注" /> |
|
|
|
|
<el-form-item label="备注" prop="remark"> |
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<!-- 表单按钮 --> |
|
|
|
@ -327,6 +270,8 @@ import {
|
|
|
|
|
postPageList, |
|
|
|
|
postUpdateBillladingStatus, |
|
|
|
|
postBillladingPackageDetail, |
|
|
|
|
postFindWaybillBillladingList, |
|
|
|
|
postAddWaybillToBillladingId, |
|
|
|
|
} from '@/api/distribution/arteryDistrilbutionBillLadingList'; |
|
|
|
|
// 引入表格配置文件 |
|
|
|
|
import { |
|
|
|
@ -337,7 +282,7 @@ import { mapGetters } from 'vuex';
|
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
import { downloadXls, setNodeHeight, debounce } from '@/utils/util'; |
|
|
|
|
import { downloadXls, setNodeHeight, debounce, handleClearTableQuery } from '@/utils/util'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
@ -359,8 +304,6 @@ export default {
|
|
|
|
|
distrilbutionDetailVisited: false, |
|
|
|
|
/** 新增线路是否显示 */ |
|
|
|
|
addDistrilbutionLineVisited: false, |
|
|
|
|
/** 新增新节点是否显示 */ |
|
|
|
|
addNewNodeVisited: false, |
|
|
|
|
}, |
|
|
|
|
// 是否显示查询 |
|
|
|
|
search: true, |
|
|
|
@ -369,10 +312,10 @@ export default {
|
|
|
|
|
/** 加载中 */ |
|
|
|
|
loadingObj: { |
|
|
|
|
loading: false, |
|
|
|
|
oldListLoading: false, |
|
|
|
|
newlistLoading: false, |
|
|
|
|
/** 详情loading */ |
|
|
|
|
detailsLoding: false, |
|
|
|
|
/** 页面loading */ |
|
|
|
|
pageLoading: false, |
|
|
|
|
}, |
|
|
|
|
/** 详情查询信息 */ |
|
|
|
|
detailQuery: {}, |
|
|
|
@ -396,42 +339,15 @@ export default {
|
|
|
|
|
total: 40, |
|
|
|
|
}, |
|
|
|
|
// 表单数据 |
|
|
|
|
form: {}, |
|
|
|
|
form: {} as any, |
|
|
|
|
// 选择行 |
|
|
|
|
selectionList: [], |
|
|
|
|
// 表单列表 |
|
|
|
|
data: [], |
|
|
|
|
/** 创建线路信息 */ |
|
|
|
|
addLineInfo: { |
|
|
|
|
/** 创建线路信息表单 */ |
|
|
|
|
addLineForm: {}, |
|
|
|
|
/** 线路列表 */ |
|
|
|
|
lineList: [{}], |
|
|
|
|
/** 起点信息 */ |
|
|
|
|
startInfo: {}, |
|
|
|
|
/** 终点信息 */ |
|
|
|
|
endInfo: {}, |
|
|
|
|
}, |
|
|
|
|
/** 新增新节点 */ |
|
|
|
|
addNewNodeInfo: { |
|
|
|
|
/** 新增新节点信息 */ |
|
|
|
|
addNewNodeForm: {}, |
|
|
|
|
/** 地图配置 */ |
|
|
|
|
//高德初始化参数 |
|
|
|
|
params: { |
|
|
|
|
zoom: 10, |
|
|
|
|
// zoomEnable: false, |
|
|
|
|
// dragEnable: false, |
|
|
|
|
}, |
|
|
|
|
map: [], |
|
|
|
|
/** 节点列表 */ |
|
|
|
|
nodeList: [{}], |
|
|
|
|
/** 节点信息 */ |
|
|
|
|
nodeInfo: {}, |
|
|
|
|
}, |
|
|
|
|
/** 字典 */ |
|
|
|
|
clientType: [], |
|
|
|
|
options: [], |
|
|
|
|
debounce, |
|
|
|
|
/** 时间 */ |
|
|
|
|
shortcuts: [ |
|
|
|
|
{ |
|
|
|
@ -476,13 +392,39 @@ export default {
|
|
|
|
|
if (code !== 200) return; |
|
|
|
|
|
|
|
|
|
this.data = data.records; |
|
|
|
|
let _billladingStatusOption = []; |
|
|
|
|
let _chargeTypeOption = []; |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < this.columnList.length; i++) { |
|
|
|
|
const value = this.columnList[i]; |
|
|
|
|
|
|
|
|
|
if (value.prop === 'billladingStatusName') _billladingStatusOption = value.checkarr; |
|
|
|
|
else if (value.prop === 'chargeTypeName') _chargeTypeOption = value.checkarr; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < this.data.length; i++) { |
|
|
|
|
const value = this.data[i]; |
|
|
|
|
|
|
|
|
|
value.billladingStatusName = ( |
|
|
|
|
_billladingStatusOption.find(item => item.value === Number(value.billladingStatus)) || |
|
|
|
|
{} |
|
|
|
|
).label; |
|
|
|
|
value.chargeTypeName = ( |
|
|
|
|
_chargeTypeOption.find(item => item.value === Number(value.chargeType)) || {} |
|
|
|
|
).label; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log('this.data :>> ', this.data); |
|
|
|
|
|
|
|
|
|
this.page.total = data.total; |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
this.loading = false; |
|
|
|
|
} |
|
|
|
|
}), |
|
|
|
|
}, 10), |
|
|
|
|
/** 被选中行 */ |
|
|
|
|
chooseWaybillInfo: {}, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
@ -544,12 +486,11 @@ export default {
|
|
|
|
|
selectsc(index, row) { |
|
|
|
|
console.log('index :>> ', index); |
|
|
|
|
console.log('row :>> ', row); |
|
|
|
|
this.query[row.prop] = index; |
|
|
|
|
if (!index) delete this.query[row.prop]; |
|
|
|
|
if (row.prop === 'certificateTypeName') { |
|
|
|
|
this.query['certificateType'] = index; |
|
|
|
|
if (!index) delete this.query['certificateType']; |
|
|
|
|
} |
|
|
|
|
const _key = row.prop.replace('Name', ''); |
|
|
|
|
this.query[_key] = index; |
|
|
|
|
|
|
|
|
|
if (!index) delete this.query[_key]; |
|
|
|
|
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
timesc(index, row) { |
|
|
|
@ -566,16 +507,18 @@ export default {
|
|
|
|
|
inputsc(index, row) { |
|
|
|
|
console.log(index, row); |
|
|
|
|
this.query[row.prop] = index; |
|
|
|
|
if (!index) delete this.query[row.prop]; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
/** 客户查询 */ |
|
|
|
|
async remoteMethod(query) { |
|
|
|
|
if (query) { |
|
|
|
|
// this.loading = true; |
|
|
|
|
this.options = []; |
|
|
|
|
} else { |
|
|
|
|
this.options = []; |
|
|
|
|
} |
|
|
|
|
if (!query) return; |
|
|
|
|
const res = await postFindWaybillBillladingList({ waybillNo: query }); |
|
|
|
|
|
|
|
|
|
const { code, data } = res.data; |
|
|
|
|
if (code !== 200) return (this.options = []); |
|
|
|
|
|
|
|
|
|
this.options = data; |
|
|
|
|
}, |
|
|
|
|
init() { |
|
|
|
|
this.height = this.setPx(document.body.clientHeight - 160); |
|
|
|
@ -616,7 +559,30 @@ export default {
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
/** 表单提交 */ |
|
|
|
|
async handleSubmit() {}, |
|
|
|
|
async handleSubmit() { |
|
|
|
|
if (!this.form.waybillNo) return this.$message.error('请选择运单'); |
|
|
|
|
if (!this.form.num) return this.$message.error('请输入大于0的数量'); |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
this.loadingObj.pageLoading = true; |
|
|
|
|
this.popUpShow.addDistrilbutionVisited = false; |
|
|
|
|
|
|
|
|
|
const submitData = { |
|
|
|
|
id: this.chooseWaybillInfo.id, |
|
|
|
|
waybillNo: this.form.waybillNo, |
|
|
|
|
enterNum: this.form.num, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const res = await postAddWaybillToBillladingId(submitData); |
|
|
|
|
const { code, msg } = res.data; |
|
|
|
|
|
|
|
|
|
if (code === 200) return this.$message.success(msg); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
this.loadingObj.pageLoading = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
/** 新增 */ |
|
|
|
|
handleAdd() { |
|
|
|
|
this.$router.push({ |
|
|
|
@ -697,7 +663,9 @@ export default {
|
|
|
|
|
/** 开启添加提货数据弹窗 */ |
|
|
|
|
handleAddDistrilbution() { |
|
|
|
|
if (this.selectionList.length === 0) return this.$message.error('最少选择一条数据'); |
|
|
|
|
if (this.selectionList.length > 1) return this.$message.error('暂时只支持单条数据操作'); |
|
|
|
|
this.title = '添加提货数据'; |
|
|
|
|
this.chooseWaybillInfo = this.selectionList[0]; |
|
|
|
|
this.popUpShow.addDistrilbutionVisited = true; |
|
|
|
|
}, |
|
|
|
|
/** 提货完成 */ |
|
|
|
@ -916,6 +884,31 @@ export default {
|
|
|
|
|
async remoteCodeMethod(query) { |
|
|
|
|
console.log('query :>> ', query); |
|
|
|
|
}, |
|
|
|
|
/** 选择运单 */ |
|
|
|
|
handleChooseWaybillNo(value) { |
|
|
|
|
console.log('value :>> ', value); |
|
|
|
|
if (!value) this.options = []; |
|
|
|
|
|
|
|
|
|
let _item: any = {}; |
|
|
|
|
for (let i = 0; i < this.options.length; i++) { |
|
|
|
|
const item = this.options[i]; |
|
|
|
|
if (item.waybillNo === value) _item = item; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_item.totalCount - _item.stockCount === 0) { |
|
|
|
|
this.$message.warning('该运单已全部入库!!!'); |
|
|
|
|
this.form = {}; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.form.maxNum = _item.totalCount - _item.stockCount; |
|
|
|
|
this.form.destination = _item.destinationWarehouseName || ''; |
|
|
|
|
this.form.goodsName = _item.goodsName || ''; |
|
|
|
|
this.form.shipperName = _item.shipperName || ''; |
|
|
|
|
this.form.shipperMobile = _item.shipperMobile || ''; |
|
|
|
|
this.form.consigneeMobile = _item.consigneeMobile || ''; |
|
|
|
|
this.form.num = 0; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
activated() { |
|
|
|
|
if (this.$store.state.isRefresh.refreshObj.addArteryDistrilbutionBillLadingList) { |
|
|
|
@ -1062,4 +1055,14 @@ export default {
|
|
|
|
|
:deep(.avue-input-map) { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.el-date-editor.el-input) { |
|
|
|
|
height: 100% !important; |
|
|
|
|
width: 100% !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
:deep(.el-input-number) { |
|
|
|
|
height: 100% !important; |
|
|
|
|
width: 100% !important; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|