Commit eca62a85 authored by 1483922988@qq.com's avatar 1483922988@qq.com

Merge branch 'test' into dev-zs

parents d1e718ce 9b4ce654
...@@ -107,6 +107,13 @@ export function feeApplicationCreateBatch(data) { ...@@ -107,6 +107,13 @@ export function feeApplicationCreateBatch(data) {
data: data data: data
}) })
} }
// 删除申请费用
export function feeApplicationDelete(id) {
return request({
url: "order/fee-application/delete?id=" + id,
method: "delete"
})
}
// 根据订单ID获取是否有正在申请的费用申请 // 根据订单ID获取是否有正在申请的费用申请
export function getFeeApplicationApproveByOrderId(orderId) { export function getFeeApplicationApproveByOrderId(orderId) {
...@@ -1096,8 +1103,8 @@ export function order_warehouse_check_revoke(data) { ...@@ -1096,8 +1103,8 @@ export function order_warehouse_check_revoke(data) {
// 到仓修改 // 到仓修改
export function order_warehouse_check_update(data) { export function order_warehouse_check_update(data) {
return request({ return request({
url: "/order-warehouse-check/update", url: "/order/order-warehouse-check/update",
method: "post", method: "put",
data data
}) })
} }
...@@ -15,7 +15,7 @@ import './permission' // permission control ...@@ -15,7 +15,7 @@ import './permission' // permission control
import './tongji' // 百度统计 import './tongji' // 百度统计
import { getDicts } from "@/api/system/dict/data"; import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/infra/config"; import { getConfigKey } from "@/api/infra/config";
import { parseTime, resetForm, addDateRange, addBeginAndEndTime, handleTree} from "@/utils/ruoyi"; import { parseTime, resetForm, addDateRange, addBeginAndEndTime, addBeginAndEndTimeNew, handleTree} from "@/utils/ruoyi";
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
// 自定义表格工具扩展 // 自定义表格工具扩展
import RightToolbar from "@/components/RightToolbar" import RightToolbar from "@/components/RightToolbar"
...@@ -33,6 +33,7 @@ Vue.prototype.parseTime = parseTime ...@@ -33,6 +33,7 @@ Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange Vue.prototype.addDateRange = addDateRange
Vue.prototype.addBeginAndEndTime = addBeginAndEndTime Vue.prototype.addBeginAndEndTime = addBeginAndEndTime
Vue.prototype.addBeginAndEndTimeNew = addBeginAndEndTimeNew
Vue.prototype.getDictDatas = getDictDatas Vue.prototype.getDictDatas = getDictDatas
Vue.prototype.getDictDatas2 = getDictDatas2 Vue.prototype.getDictDatas2 = getDictDatas2
Vue.prototype.getDictDataLabel = getDictDataLabel Vue.prototype.getDictDataLabel = getDictDataLabel
......
...@@ -105,6 +105,31 @@ export function addBeginAndEndTime(params, dateRange, propName,isTime = true) { ...@@ -105,6 +105,31 @@ export function addBeginAndEndTime(params, dateRange, propName,isTime = true) {
return params; return params;
} }
export function addBeginAndEndTimeNew(params, dateRange, prefixName, propName, isTime = true) {
// 必须传入参数
if (!dateRange) {
return params;
}
// 如果未传递 propName 属性,默认为 time
if (!propName) {
propName = 'Time';
} else {
propName = propName.charAt(0).toUpperCase() + propName.slice(1);
}
if (!prefixName) {
prefixName = ''
}
console.log('dateRange', dateRange)
// 设置参数
if (dateRange[0]) {
params[prefixName + 'Begin' + propName] = dateRange[0] + (isTime ? ' 00:00:00':'');
}
if (dateRange[1]) {
params[prefixName + 'End' + propName] = dateRange[1] + (isTime ? ' 23:59:59' : '');
}
return params;
}
// 字符串格式化(%s ) // 字符串格式化(%s )
export function sprintf(str) { export function sprintf(str) {
var args = arguments, flag = true, i = 1; var args = arguments, flag = true, i = 1;
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="108px">
<el-form-item :label="$t('自编号')" prop="selfNo"> <el-form-item :label="$t('自编号')" prop="selfNo">
<el-input v-model="queryParams.selfNo" :placeholder="$t('请输入自编号')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.selfNo" :placeholder="$t('请输入自编号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
...@@ -11,15 +11,25 @@ ...@@ -11,15 +11,25 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId"> <el-form-item :label="$t('始发仓')" prop="startWarehouseIdList">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')"> <el-select v-model="queryParams.startWarehouseIdList" multiple :placeholder="$t('请选择始发仓')" clearable collapse-tags>
<el-option v-for="item in exportWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="destWarehouseId"> <el-form-item :label="$t('目的国')" prop="countryIdList">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')"> <el-select v-model="countryIdList" multiple :label="countryIdList" :placeholder="$t('请选择目的国')" clearable collapse-tags>
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的城市')" prop="destCityIdList">
<el-select v-model="destCityIdList" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable collapse-tags>
<el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseIdList">
<el-select v-model="destWarehouseIdList" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable collapse-tags>
<el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -28,14 +38,14 @@ ...@@ -28,14 +38,14 @@
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_AIR_SHIPMENT_STATE)" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value" /> <el-option v-for="dict in this.getDictDatas(DICT_TYPE.BOX_AIR_SHIPMENT_STATE)" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-row> <!-- <el-row> -->
<el-form-item :label="$t('时间')" prop="date"> <el-form-item :label="$t('时间')" prop="date">
<el-select v-model="queryParams.dateType" :placeholder="$t('请选择时间类型')" clearable size="small"> <el-select v-model="queryParams.dateType" :placeholder="$t('请选择时间类型')" clearable size="small">
<el-option v-for="item in dateTypes" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in dateTypes" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" start-:placeholder="$t('开始日期')" end-:placeholder="$t('结束日期')" /> <el-date-picker v-model="queryParams.dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('提单制作')" prop="ladingBillStatus"> <el-form-item :label="$t('提单制作')" prop="ladingBillStatus">
<el-select v-model="queryParams.ladingBillStatus" :placeholder="$t('请选择提单制作状态')" clearable size="small"> <el-select v-model="queryParams.ladingBillStatus" :placeholder="$t('请选择提单制作状态')" clearable size="small">
...@@ -43,19 +53,62 @@ ...@@ -43,19 +53,62 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的港清关')" prop="destinationClearance"> <el-form-item :label="$t('起运港')" v-show="showSearch">
<dockSelect v-model="queryParams.bigPortIdList" :placeholder="$t('请选择起运港')" portType="2" :allDocks="allDocks" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('目的港')" v-show="showSearch">
<dockSelect v-model="queryParams.destPortIdList" :placeholder="$t('请选择目的港')" portType="2" :allDocks="allDocks" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('目的港清关')" prop="destinationClearance" v-show="showSearch">
<el-select v-model="queryParams.destinationClearance" :placeholder="$t('请选择目的港清关')" clearable size="small"> <el-select v-model="queryParams.destinationClearance" :placeholder="$t('请选择目的港清关')" clearable size="small">
<el-option v-for="item in destinationClearanceData" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in destinationClearanceData" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('发货方式')" prop="deliveryType"> <el-form-item :label="$t('发货方式')" prop="deliveryType" v-show="showSearch">
<el-select v-model="queryParams.deliveryType" :placeholder="$t('请选择发货方式')" clearable size="small"> <el-select v-model="queryParams.deliveryType" :placeholder="$t('请选择发货方式')" clearable size="small">
<el-option v-for="item in deliveryTypeData" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in deliveryTypeData" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row>
<el-form-item :label="$t('航程')" prop="voyage" v-show="showSearch">
<el-select v-model="queryParams.voyage">
<el-option
v-for="item in voyageData"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('订舱代理')" v-show="showSearch">
<supplierSelect v-model="queryParams.shipperId" :companyType="'5'" :placeholder="$t('请选择订舱代理')" :allSupplier="allSupplier" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('航空公司')" v-show="showSearch">
<supplierSelect v-model="queryParams.airlineCompanyIdList" :placeholder="$t('请选择航空公司')" company-type="10" :allSupplier="allSupplier" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('代理公司Agent')" v-show="showSearch">
<supplierSelect v-model="queryParams.agentIdList" :placeholder="$t('请选择代理公司')" company-type="1" :allSupplier="allSupplier" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="dcCustomsType" v-show="showSearch">
<el-select v-model="queryParams.dcCustomsType" :placeholder="$t('请选择报关方式')" clearable multiple collapse-tags>
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CUSTOMS_TYPE)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('报关公司')" v-show="showSearch">
<supplierSelect v-model="queryParams.dcCompanyId" :companyType="'2'" :placeholder="$t('请选择报关公司')" :allSupplier="allSupplier" clearable multiple collapse-tags />
</el-form-item>
<el-row>
<el-form-item :label="$t('预计起飞时间')" prop="flyTime" v-show="showSearch">
<el-date-picker type="datetimerange" :start-placeholder="$t('预计起飞开始日期')" :end-placeholder="$t('预计起飞结束日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.flyBeginTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('放行时间')" v-show="showSearch">
<el-date-picker type="datetimerange" :start-placeholder="$t('放行开始日期')" :end-placeholder="$t('放行结束日期')" v-model="queryParams.dcPassBeginTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-row>
<!-- </el-row> -->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('重置') }}</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('重置') }}</el-button>
...@@ -240,11 +293,17 @@ import { getWarehouseList } from '@/api/ecw/warehouse' ...@@ -240,11 +293,17 @@ import { getWarehouseList } from '@/api/ecw/warehouse'
import costForm from './costForm.vue' import costForm from './costForm.vue'
import regError from './regError.vue' import regError from './regError.vue'
import editAirForm from './editAirForm.vue' import editAirForm from './editAirForm.vue'
import dockSelect from "./shippingSea/nodePage/common/dockSelect.vue"
import supplierSelect from "./shippingSea/nodePage/common/supplierSelect.vue"
import { import {
downloadFile, downloadFile,
downloadFileByUrl, downloadFileByUrl,
formatDate, formatDate,
constantDict,
} from "./shippingAir/utils"; } from "./shippingAir/utils";
import { getRegionList } from "@/api/ecw/order";
import { getDockPage } from "@/api/ecw/dock";
import { getSupplierPage } from "@/api/ecw/supplier";
import {getCabinetPage} from "@/api/ecw/cabinet"; import {getCabinetPage} from "@/api/ecw/cabinet";
import LadingBill from "@/views/ecw/box/ladingBill/index.vue"; import LadingBill from "@/views/ecw/box/ladingBill/index.vue";
import {listUser} from "@/api/system/user"; import {listUser} from "@/api/system/user";
...@@ -255,10 +314,26 @@ export default { ...@@ -255,10 +314,26 @@ export default {
LadingBill, LadingBill,
costForm, costForm,
regError, regError,
editAirForm editAirForm,
dockSelect,
supplierSelect,
}, },
data() { data() {
return { return {
AddressCity: [],
AddressProvince: [],
AddressTown: [],
countryIdList: null,
destCityIdList: null,
destWarehouseIdList: null,
// 选中数组
ids: [],
//目的国
countryList: [],
//目的城市
cityList: [],
//目的仓
destWarehouseList: [],
cabinetList:[], cabinetList:[],
dateTypes: [ dateTypes: [
{ value: '1', label: this.$t('分拣时间') }, { value: '1', label: this.$t('分拣时间') },
...@@ -274,7 +349,7 @@ export default { ...@@ -274,7 +349,7 @@ export default {
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: false,
// 总条数 // 总条数
total: 0, total: 0,
// 出货列表 // 出货列表
...@@ -303,11 +378,16 @@ export default { ...@@ -303,11 +378,16 @@ export default {
cabinetId: null, cabinetId: null,
shipmentStatusAir: null, shipmentStatusAir: null,
startWarehouseId: null, startWarehouseId: null,
destWarehouseId: null, destWarehouseIdList: null,
transportType: null transportType: null
}, },
channelList: [], channelList: [],
warehouseList: [], warehouseList: [],
// 码头
allDocks: [],
// 供应商
allSupplier: [],
voyageData: constantDict.voyageData,
// 表单参数 // 表单参数
form: {}, form: {},
// 表单校验 // 表单校验
...@@ -326,7 +406,7 @@ export default { ...@@ -326,7 +406,7 @@ export default {
trigger: 'blur' trigger: 'blur'
} }
], ],
destWarehouseId: [ destWarehouseIdList: [
{ {
required: true, required: true,
message: this.$t('目的地不能为空'), message: this.$t('目的地不能为空'),
...@@ -383,6 +463,149 @@ export default { ...@@ -383,6 +463,149 @@ export default {
] ]
} }
}, },
watch: {
countryIdList: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = []
this.AddressTown = []
this.destCityIdList = ""
this.destWarehouseIdList = ""
this.findByprovinceCode()
if (this.countryIdList == "") {
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.countryIdList != "" && this.destCityIdList == "" && this.destWarehouseIdList == "") {
getRegionList(2, this.countryIdList)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
//重新加载目的城市
//目的城市
// getRegionList(4, 4).then(({data}) => {
// this.AddressCity = data;
// })
// .catch(error => {
// console.log(error);
// });
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// })
// .catch(error => {
// console.log(error);
// });
}
},
destCityIdList: {
deep: true, //深度监听
handler() {
this.AddressTown = []
this.destWarehouseIdList = ""
this.findBycityCode()
if (this.destCityIdList != "" && this.countryIdList != "" && this.destWarehouseIdList == "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityIdList)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.countryIdList == "" && this.destCityIdList == "" && this.destWarehouseIdList == "") {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.countryIdList != "" && this.destCityIdList == "" && this.destWarehouseIdList == "") {
getRegionList(2, this.countryIdList)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
// else if(this.destCityIdList!="" && this.destCityIdList=="" ){
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// }).catch(error => {
// console.log(error);
// });
// }
}
},
destWarehouseIdList: {
deep: true, //深度监听
handler() {
if (this.destCityIdList != "" && this.countryIdList != "" && this.destWarehouseIdList == "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityIdList)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.countryIdList != "" && this.destCityIdList == "" && this.destWarehouseIdList == "") {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
// else if(this.destCityIdList=="" && this.destWarehouseIdList==""){
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// })
// .catch(error => {
// console.log(error);
// });
// }
}
}
},
computed: { computed: {
getCabinetName() { getCabinetName() {
return (cabinetId) => { return (cabinetId) => {
...@@ -414,6 +637,7 @@ export default { ...@@ -414,6 +637,7 @@ export default {
} }
}, },
created() { created() {
this.init()
getCabinetPage({status:0}).then((response) => { getCabinetPage({status:0}).then((response) => {
this.cabinetList = response.data.list; this.cabinetList = response.data.list;
}); });
...@@ -434,6 +658,80 @@ export default { ...@@ -434,6 +658,80 @@ export default {
}, },
methods: { methods: {
init() {
//加载时发起请求获取所有省份值
getRegionList(1, 1)
.then(({ data }) => {
this.AddressProvince = data
console.log(this.AddressProvince)
})
.catch((error) => {
console.log(error)
})
//目的城市
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
//目的仓
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
// 码头
getDockPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allDocks = data.list;
});
// 供应商
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list.map((item) => {
if (item.companyType) {
item.companyTypes = item.companyType.split(",");
}
return item;
});
});
},
findByprovinceCode() {
//获取当前省份值id,获取该省份下城市 countryIdList provinceCode
getRegionList(2, this.countryIdList)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
},
findBycityCode() {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityIdList)
.then(({ data }) => {
this.AddressTown = data
// 去重
// let uniqueDataList = data.filter((item, index, self) => {
// // 返回第一个匹配项的索引,用于判断当前项是否为第一个匹配项
// const firstIndex = self.findIndex((obj) => obj.guojia === item.guojia);
// // 如果当前项是第一个匹配项,则保留,否则过滤掉
// return index === firstIndex;
// });
// this.AddressProvince = uniqueDataList
})
.catch((error) => {
console.log(error)
})
},
formatDate, formatDate,
getChannelList() { getChannelList() {
getChannelList().then((res) => (this.channelList = res.data)) getChannelList().then((res) => (this.channelList = res.data))
...@@ -459,15 +757,17 @@ export default { ...@@ -459,15 +757,17 @@ export default {
let params = { ...this.queryParams } let params = { ...this.queryParams }
params.transportType = 3 params.transportType = 3
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime') this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime')
this.addBeginAndEndTimeNew(params, params.flyBeginTime, 'fly');// 预计起飞时间
this.addBeginAndEndTimeNew(params, params.dcPassBeginTime, 'dcPass');// 放行时间
// 执行查询 // 执行查询
getboxPage(params).then((response) => { getboxPage(params).then((response) => {
this.list = response.data.list this.list = response.data.list
this.total = response.data.total this.total = response.data.total
// var lineParams = [] // var lineParams = []
// this.list.forEach(item=>{ // this.list.forEach(item=>{
// let line = lineParams.findIndex(li=>li.startWarehouseId==item.startWarehouseId&&li.destWarehouseId==item.destWarehouseId&&li.transportType==item.transportType) // let line = lineParams.findIndex(li=>li.startWarehouseId==item.startWarehouseId&&li.destWarehouseIdList==item.destWarehouseIdList&&li.transportType==item.transportType)
// if(line == -1){ // if(line == -1){
// lineParams.push({startWarehouseId:item.startWarehouseId,destWarehouseId:item.destWarehouseId,transportType:item.transportType}) // lineParams.push({startWarehouseId:item.startWarehouseId,destWarehouseIdList:item.destWarehouseIdList,transportType:item.transportType})
// } // }
// }) // })
// getLineInfoList(lineParams) // getLineInfoList(lineParams)
...@@ -492,7 +792,7 @@ export default { ...@@ -492,7 +792,7 @@ export default {
id: undefined, id: undefined,
cabinetId: undefined, cabinetId: undefined,
startWarehouseId: undefined, startWarehouseId: undefined,
destWarehouseId: undefined, destWarehouseIdList: undefined,
transportType: undefined transportType: undefined
} }
this.resetForm('form') this.resetForm('form')
...@@ -556,6 +856,8 @@ export default { ...@@ -556,6 +856,8 @@ export default {
params.pageNo = undefined params.pageNo = undefined
params.pageSize = undefined params.pageSize = undefined
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime') this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime')
this.addBeginAndEndTimeNew(params, params.flyBeginTime, 'fly');// 预计起飞时间
this.addBeginAndEndTimeNew(params, params.dcPassBeginTime, 'dcPass');// 放行时间
// 执行导出 // 执行导出
this.$modal this.$modal
.confirm(this.$t('是否确认导出所有出货数据项?')) .confirm(this.$t('是否确认导出所有出货数据项?'))
...@@ -588,7 +890,7 @@ export default { ...@@ -588,7 +890,7 @@ export default {
this.handleDelete(row); this.handleDelete(row);
break; break;
case "editLadingBill": case "editLadingBill":
let line = await getLineInfo({startWarehouseId: row.startWarehouseId,destWarehouseId: row.destWarehouseId,transportType:row.transportType}) let line = await getLineInfo({startWarehouseId: row.startWarehouseId,destWarehouseIdList: row.destWarehouseIdList,transportType:row.transportType})
let makeBillNode = line.data.makeBillNode let makeBillNode = line.data.makeBillNode
console.log(row,this.makeBillNodeStatus[makeBillNode]) console.log(row,this.makeBillNodeStatus[makeBillNode])
if(row.shipmentStatusAir<this.makeBillNodeStatus[makeBillNode]){ if(row.shipmentStatusAir<this.makeBillNodeStatus[makeBillNode]){
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
ref="queryForm" ref="queryForm"
size="small" size="small"
:inline="true" :inline="true"
v-show="showSearch" label-width="104px"
label-width="68px"
> >
<el-form-item :label="$t('运输方式')" prop="transportType"> <el-form-item :label="$t('运输方式')" prop="transportType">
<el-select <el-select
...@@ -56,83 +55,27 @@ ...@@ -56,83 +55,27 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="startWarehouseId"> <el-form-item :label="$t('始发仓')" prop="startWarehouseIdList">
<el-select <el-select v-model="queryParams.startWarehouseIdList" multiple :placeholder="$t('请选择始发仓')" clearable collapse-tags>
v-model="queryParams.startWarehouseId" <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
:placeholder="$t('请选择始发地')"
clearable
>
<el-option
v-for="item in exportWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="destWarehouseId"> <el-form-item :label="$t('目的国')" prop="countryIdList">
<el-select <el-select v-model="countryIdList" multiple :label="countryIdList" :placeholder="$t('请选择目的国')" clearable collapse-tags>
v-model="queryParams.destWarehouseId" <el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
:placeholder="$t('请选择目的地')"
clearable
>
<el-option
v-for="item in importWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的城市')" prop="destCityIdList">
<el-form-item label="" prop="dateType"> <el-select v-model="destCityIdList" multiple :placeholder="$t('请选择目的城市')" style="width: 200px" clearable collapse-tags>
<el-select <el-option v-for="item in AddressCity" :key="item.shi" :label="item.shiName" :value="item.shi"></el-option>
v-model="queryParams.dateType"
:placeholder="$t('请选择时间类型')"
clearable
size="small"
>
<el-option
v-for="item in dateTypes"
:key="item.value"
:label="$l(item, 'label')"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseIdList">
<el-form-item label="" prop="dateRangeCreateTime"> <el-select v-model="destWarehouseIdList" multiple :placeholder="$t('请选择目的仓')" style="width: 200px" clearable collapse-tags>
<el-date-picker <el-option v-for="item in AddressTown" :key="item.id" :label="item.titleZh" :value="item.id"></el-option>
v-model="queryParams.dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
clearable
/>
</el-form-item>
<el-form-item :label="$t('状态')" prop="boxStatus">
<el-select
v-model="queryParams.boxStatus"
:placeholder="$t('请选择状态')"
clearable
size="small"
>
<el-option
v-for="dict in this.getDictDatas(
DICT_TYPE.BOX_ORDER_SHIPMENT_STATE
)"
:key="dict.value"
:label="$l(dict, 'label')"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')" prop="countryId"> <el-form-item :label="$t('国家')" prop="countryId">
<el-select <el-select
v-model="queryParams.countryId" v-model="queryParams.countryId"
...@@ -149,7 +92,6 @@ ...@@ -149,7 +92,6 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('提单制作')" prop="ladingBillStatus"> <el-form-item :label="$t('提单制作')" prop="ladingBillStatus">
<el-select <el-select
v-model="queryParams.ladingBillStatus" v-model="queryParams.ladingBillStatus"
...@@ -166,6 +108,127 @@ ...@@ -166,6 +108,127 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('状态')" prop="boxStatusList">
<el-select
v-model="queryParams.boxStatusList"
:placeholder="$t('请选择状态')"
clearable
multiple
size="small"
>
<el-option
v-for="dict in this.getDictDatas(
DICT_TYPE.BOX_ORDER_SHIPMENT_STATE
)"
:key="dict.value"
:label="$l(dict, 'label')"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('出单方式')" v-show="showSearch">
<el-select v-model="queryParams.cdOutBillType" :placeholder="$t('请选择出单方式')" clearable multiple collapse-tags>
<el-option v-for="item in method" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-row>
<el-form-item :label="$t('时间')" prop="dateType">
<el-select
v-model="queryParams.dateType"
:placeholder="$t('请选择时间类型')"
clearable
size="small"
>
<el-option
v-for="item in dateTypes"
:key="item.value"
:label="$l(item, 'label')"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="" prop="dateRangeCreateTime">
<el-date-picker
v-model="queryParams.dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
clearable
/>
</el-form-item>
</el-row>
<el-form-item :label="$t('起运港')" v-show="showSearch">
<dockSelect v-model="queryParams.bigPortIdList" :placeholder="$t('请选择起运港')" portType="2" :allDocks="allDocks" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('目的港')" v-show="showSearch">
<dockSelect v-model="queryParams.destPortIdList" :placeholder="$t('请选择目的港')" portType="2" :allDocks="allDocks" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('驳船港')" v-show="showSearch">
<dockSelect v-model="queryParams.bargePortIdList" :placeholder="$t('请选择驳船港')" portType="2" :allDocks="allDocks" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('订舱公司')" v-show="showSearch">
<supplierSelect v-model="queryParams.spaceCompanyIdList" :companyType="'1'" :placeholder="$t('请选择订舱公司')" :allSupplier="allSupplier" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="dcCustomsType" v-show="showSearch">
<el-select v-model="queryParams.dcCustomsType" :placeholder="$t('请选择报关方式')" clearable multiple collapse-tags>
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_CUSTOMS_TYPE)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('报关公司')" v-show="showSearch">
<supplierSelect v-model="queryParams.dcCompanyId" :companyType="'2'" :placeholder="$t('请选择报关公司')" :allSupplier="allSupplier" clearable multiple collapse-tags />
</el-form-item>
<el-form-item :label="$t('预计驳船时间')" v-show="showSearch">
<el-date-picker type="datetimerange" :start-placeholder="$t('预计驳船开始日期')" :end-placeholder="$t('预计驳船结束日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.bargeBeginTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('预计开船时间')" v-show="showSearch">
<el-date-picker type="datetimerange" :start-placeholder="$t('预计开船开始日期')" :end-placeholder="$t('预计开船结束日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.sailBeginTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('截补料时间')" v-show="showSearch">
<el-date-picker type="datetimerange" :start-placeholder="$t('截补料开始日期')" :end-placeholder="$t('截补料结束日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.ladingBillBeginTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('VGM提交时间')" v-show="showSearch">
<el-date-picker type="datetimerange" :start-placeholder="$t('VGM提交开始日期')" :end-placeholder="$t('VGM提交结束日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.customsBeginTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('截关时间')" v-show="showSearch">
<el-date-picker type="datetimerange" :start-placeholder="$t('截关开始日期')" :end-placeholder="$t('截关结束日期')" value-format="yyyy-MM-dd HH:mm:ss" v-model="queryParams.cutOffBeginTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('放行时间')" v-show="showSearch">
<el-date-picker type="datetimerange" :start-placeholder="$t('放行开始日期')" :end-placeholder="$t('放行结束日期')" v-model="queryParams.dcPassBeginTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('实际开船时间')" v-show="showSearch">
<el-date-picker type="datetimerange" :start-placeholder="$t('实际开船开始日期')" :end-placeholder="$t('实际开船结束日期')" v-model="queryParams.bgRealShipBeginTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('预计到港时间')" v-show="showSearch">
<el-date-picker type="datetimerange" :start-placeholder="$t('预计到港开始日期')" :end-placeholder="$t('预计到港结束日期')" v-model="queryParams.estBeginTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('预计清关时间')" v-show="showSearch">
<el-date-picker type="datetimerange" :start-placeholder="$t('预计清关开始日期')" :end-placeholder="$t('预计清关结束日期')" v-model="queryParams.clEstBeginTime" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="Agent list状态" v-show="showSearch">
<el-select v-model="queryParams.cdAgentlistType">
<el-option
v-for="item in status"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="Soncap状态" v-show="showSearch">
<el-select v-model="queryParams.cdSoncapType">
<el-option
v-for="item in status"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{
...@@ -516,16 +579,23 @@ import { ...@@ -516,16 +579,23 @@ import {
downloadFile, downloadFile,
downloadFileByUrl, downloadFileByUrl,
formatDate, formatDate,
constantDict,
} from "./shippingSea/utils"; } from "./shippingSea/utils";
import { getRegionList } from "@/api/ecw/order";
import { getCabinetPage } from "@/api/ecw/cabinet"; import { getCabinetPage } from "@/api/ecw/cabinet";
import { getWarehouseList } from "@/api/ecw/warehouse"; import { getWarehouseList } from "@/api/ecw/warehouse";
import { getListTree } from "@/api/ecw/region"; import { getListTree } from "@/api/ecw/region";
import { getDockPage } from "@/api/ecw/dock";
import { getSupplierPage } from "@/api/ecw/supplier";
import costForm from "./costForm.vue"; import costForm from "./costForm.vue";
import dockSelect from "./shippingSea/nodePage/common/dockSelect.vue";
import supplierSelect from "./shippingSea/nodePage/common/supplierSelect.vue";
//异常登记对话框 //异常登记对话框
import regError from "./regError.vue"; import regError from "./regError.vue";
import editForm from "./editForm.vue"; import editForm from "./editForm.vue";
import ladingBill from "./ladingBill/index.vue"; import ladingBill from "./ladingBill/index.vue";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
import { set } from "nprogress";
export default { export default {
name: "EcwBoxIndexsea", name: "EcwBoxIndexsea",
...@@ -534,9 +604,25 @@ export default { ...@@ -534,9 +604,25 @@ export default {
regError, regError,
editForm, editForm,
ladingBill, ladingBill,
dockSelect,
supplierSelect,
}, },
data() { data() {
return { return {
AddressCity: [],
AddressProvince: [],
AddressTown: [],
countryIdList: null,
destCityIdList: null,
destWarehouseIdList: null,
// 选中数组
ids: [],
//目的国
countryList: [],
//目的城市
cityList: [],
//目的仓
destWarehouseList: [],
dateTypes: [ dateTypes: [
{ value: "1", label: this.$t("预装时间") }, { value: "1", label: this.$t("预装时间") },
{ value: "2", label: this.$t("装柜时间") }, { value: "2", label: this.$t("装柜时间") },
...@@ -555,7 +641,7 @@ export default { ...@@ -555,7 +641,7 @@ export default {
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: false,
// 总条数 // 总条数
total: 0, total: 0,
// 出货列表 // 出货列表
...@@ -586,8 +672,159 @@ export default { ...@@ -586,8 +672,159 @@ export default {
// 通知列表 // 通知列表
noticeList: [], noticeList: [],
allUsers: [], allUsers: [],
// 码头
allDocks: [],
// 供应商
allSupplier: [],
// 出单方式
method: constantDict.billingMethod,
// 选项
status: constantDict.isFile,
}; };
}, },
watch: {
countryIdList: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = []
this.AddressTown = []
this.destCityIdList = ""
this.destWarehouseIdList = ""
this.findByprovinceCode()
if (this.countryIdList == "") {
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.countryIdList != "" && this.destCityIdList == "" && this.destWarehouseIdList == "") {
getRegionList(2, this.countryIdList)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
//重新加载目的城市
//目的城市
// getRegionList(4, 4).then(({data}) => {
// this.AddressCity = data;
// })
// .catch(error => {
// console.log(error);
// });
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// })
// .catch(error => {
// console.log(error);
// });
}
},
destCityIdList: {
deep: true, //深度监听
handler() {
this.AddressTown = []
this.destWarehouseIdList = ""
this.findBycityCode()
if (this.destCityIdList != "" && this.countryIdList != "" && this.destWarehouseIdList == "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityIdList)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.countryIdList == "" && this.destCityIdList == "" && this.destWarehouseIdList == "") {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.countryIdList != "" && this.destCityIdList == "" && this.destWarehouseIdList == "") {
getRegionList(2, this.countryIdList)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
// else if(this.destCityIdList!="" && this.destCityIdList=="" ){
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// }).catch(error => {
// console.log(error);
// });
// }
}
},
destWarehouseIdList: {
deep: true, //深度监听
handler() {
if (this.destCityIdList != "" && this.countryIdList != "" && this.destWarehouseIdList == "") {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityIdList)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
} else if (this.countryIdList != "" && this.destCityIdList == "" && this.destWarehouseIdList == "") {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
}
// else if(this.destCityIdList=="" && this.destWarehouseIdList==""){
// getRegionList(5, 5).then(({data}) => {
// this.AddressTown = data;
// })
// .catch(error => {
// console.log(error);
// });
// }
}
}
},
computed: { computed: {
exportWarehouseList() { exportWarehouseList() {
return this.warehouseList.filter( return this.warehouseList.filter(
...@@ -611,6 +848,7 @@ export default { ...@@ -611,6 +848,7 @@ export default {
}, },
}, },
created() { created() {
this.init()
this.transportTypes = this.getDictDatas( this.transportTypes = this.getDictDatas(
this.DICT_TYPE.ECW_TRANSPORT_TYPE this.DICT_TYPE.ECW_TRANSPORT_TYPE
).filter((item) => item.value == "1" || item.value == "2"); ).filter((item) => item.value == "1" || item.value == "2");
...@@ -628,6 +866,80 @@ export default { ...@@ -628,6 +866,80 @@ export default {
}); });
}, },
methods: { methods: {
init() {
//加载时发起请求获取所有省份值
getRegionList(1, 1)
.then(({ data }) => {
this.AddressProvince = data
console.log(this.AddressProvince)
})
.catch((error) => {
console.log(error)
})
//目的城市
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
//目的仓
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data
})
.catch((error) => {
console.log(error)
})
// 码头
getDockPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allDocks = data.list;
});
// 供应商
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list.map((item) => {
if (item.companyType) {
item.companyTypes = item.companyType.split(",");
}
return item;
});
});
},
findByprovinceCode() {
//获取当前省份值id,获取该省份下城市 countryIdList provinceCode
getRegionList(2, this.countryIdList)
.then(({ data }) => {
this.AddressCity = data
})
.catch((error) => {
console.log(error)
})
},
findBycityCode() {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityIdList)
.then(({ data }) => {
this.AddressTown = data
// 去重
// let uniqueDataList = data.filter((item, index, self) => {
// // 返回第一个匹配项的索引,用于判断当前项是否为第一个匹配项
// const firstIndex = self.findIndex((obj) => obj.guojia === item.guojia);
// // 如果当前项是第一个匹配项,则保留,否则过滤掉
// return index === firstIndex;
// });
// this.AddressProvince = uniqueDataList
})
.catch((error) => {
console.log(error)
})
},
formatDate, formatDate,
queryNotice() { queryNotice() {
getNoticeList({ getNoticeList({
...@@ -656,6 +968,15 @@ export default { ...@@ -656,6 +968,15 @@ export default {
let params = { ...this.queryParams }; let params = { ...this.queryParams };
params.transportTypeList = ["1", "2"]; params.transportTypeList = ["1", "2"];
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime"); this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
this.addBeginAndEndTimeNew(params, params.bargeBeginTime, 'barge');// 预计驳船时间
this.addBeginAndEndTimeNew(params, params.sailBeginTime, 'sail');// 预计开船时间
this.addBeginAndEndTimeNew(params, params.ladingBillBeginTime, 'ladingBill');// 截补料时间
this.addBeginAndEndTimeNew(params, params.customsBeginTime, 'customs');// VGM提交时间
this.addBeginAndEndTimeNew(params, params.cutOffBeginTime, 'cutOff');// 截关时间
this.addBeginAndEndTimeNew(params, params.clEstBeginTime, 'clEst');// 预计清关时间
this.addBeginAndEndTimeNew(params, params.bgRealShipBeginTime, 'bgRealShip');// 实际开船时间
this.addBeginAndEndTimeNew(params, params.estBeginTime, 'est');// 预计到港时间
this.addBeginAndEndTimeNew(params, params.dcPassBeginTime, 'dcPass');// 放行时间
// 执行查询 // 执行查询
getboxPage(params).then((response) => { getboxPage(params).then((response) => {
this.list = response.data.list; this.list = response.data.list;
...@@ -723,6 +1044,15 @@ export default { ...@@ -723,6 +1044,15 @@ export default {
params.pageSize = undefined; params.pageSize = undefined;
params.transportTypeList = ["1", "2"]; params.transportTypeList = ["1", "2"];
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime"); this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
this.addBeginAndEndTimeNew(params, params.bargeBeginTime, 'barge');// 预计驳船时间
this.addBeginAndEndTimeNew(params, params.sailBeginTime, 'sail');// 预计开船时间
this.addBeginAndEndTimeNew(params, params.ladingBillBeginTime, 'ladingBill');// 截补料时间
this.addBeginAndEndTimeNew(params, params.customsBeginTime, 'customs');// VGM提交时间
this.addBeginAndEndTimeNew(params, params.cutOffBeginTime, 'cutOff');// 截关时间
this.addBeginAndEndTimeNew(params, params.clEstBeginTime, 'clEst');// 预计清关时间
this.addBeginAndEndTimeNew(params, params.bgRealShipBeginTime, 'bgRealShip');// 实际开船时间
this.addBeginAndEndTimeNew(params, params.estBeginTime, 'est');// 预计到港时间
this.addBeginAndEndTimeNew(params, params.dcPassBeginTime, 'dcPass');// 放行时间
// 执行导出 // 执行导出
this.$modal this.$modal
.confirm(this.$t("是否确认导出所有出货数据项?")) .confirm(this.$t("是否确认导出所有出货数据项?"))
......
...@@ -252,15 +252,20 @@ ...@@ -252,15 +252,20 @@
align="center" align="center"
width="120px" width="120px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
:disabled="scope.row.abnormalDealStatus === 1" :disabled="scope.row.abnormalDealStatus === 1"
@click="() => updateStatus('single', scope.row)" @click="() => updateStatus('single', scope.row)"
style="margin-top: 5px"
>{{ $t("更新状态") }}</el-button >{{ $t("更新状态") }}</el-button
> >
<el-button type="danger" style="margin-top: 5px;" size="small" @click="openError(scope.row)">{{$t('异常')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
...@@ -590,6 +595,7 @@ import { listUser } from "@/api/system/user"; ...@@ -590,6 +595,7 @@ import { listUser } from "@/api/system/user";
//lanbm 2024-05-16 add //lanbm 2024-05-16 add
import { getCurrencyList } from "@/api/ecw/currency"; import { getCurrencyList } from "@/api/ecw/currency";
import unloadingError from "@/views/ecw/box/shippingSea/nodePage/unloading/unloadingError.vue"; import unloadingError from "@/views/ecw/box/shippingSea/nodePage/unloading/unloadingError.vue";
import Template from "@/views/cms/template/index.vue";
export default { export default {
name: "EcwBoxQuery", name: "EcwBoxQuery",
...@@ -597,6 +603,7 @@ export default { ...@@ -597,6 +603,7 @@ export default {
shipmentId: String, shipmentId: String,
}, },
components: { components: {
Template,
costForm, costForm,
regError, regError,
editForm, editForm,
...@@ -746,6 +753,11 @@ export default { ...@@ -746,6 +753,11 @@ export default {
this.currRow = row; this.currRow = row;
this.dialogVisible = true; this.dialogVisible = true;
}, },
/* 打开异常 */
openError(row) {
this.currRow = row;
this.dialogVisible = true;
},
/* 更新状态 */ /* 更新状态 */
updateStatus(type, row) { updateStatus(type, row) {
let orders = []; let orders = [];
......
...@@ -323,7 +323,7 @@ ...@@ -323,7 +323,7 @@
>{{ $t("撤销清关申请") }}</el-button >{{ $t("撤销清关申请") }}</el-button
> >
<!-- <el-button type="danger" style="margin-top: 5px;" size="small" @click="openError(scope.row)">{{$t('异常')}}</el-button> --> <el-button type="danger" style="margin-top: 5px;" size="small" @click="openError(scope.row)">{{$t('异常')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px"> <el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px">
<el-form-item :label="$t('代理商Agent')" prop="agentId"> <el-form-item :label="$t('代理商Agent')" prop="agentId">
<supplierOutSelect v-model="agentObj.agentId" :companyType="'1'" :areaType="1" :placeholder="$t('请选择代理商')" :allSupplier="this.$attrs.allSupplier" /> <supplierOutSelect v-model="agentObj.agentId" :companyType="'1'" :areaType="1" :placeholder="$t('请选择代理商')" :allSupplier="this.$attrs.allSupplier" />
<el-button v-hasPermi="['ecw:supplier:query']" type="text" style="font-size: 13px; margin-left: 240px;" @click="SupplierDetail">{{$t('查看代理商详情')}}</el-button> <el-button v-if="agentObj.agentId" v-hasPermi="['ecw:supplier:query']" type="text" style="font-size: 13px; margin-left: 240px;" @click="SupplierDetail">{{$t('查看代理商详情')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px"> <el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px">
<el-form-item :label="$t('代理商Agent')" prop="agentId"> <el-form-item :label="$t('代理商Agent')" prop="agentId">
<supplierOutSelect v-model="agentObj.agentId" :companyType="'1'" :areaType="1" :placeholder="$t('请选择代理商')" :allSupplier="this.$attrs.allSupplier" /> <supplierOutSelect v-model="agentObj.agentId" :companyType="'1'" :areaType="1" :placeholder="$t('请选择代理商')" :allSupplier="this.$attrs.allSupplier" />
<el-button v-hasPermi="['ecw:supplier:query']" type="text" style="font-size: 13px; margin-left: 240px;" @click="SupplierDetail">{{$t('查看代理商详情')}}</el-button> <el-button v-hasPermi="['ecw:supplier:query']" v-if="agentObj.agentId" type="text" style="font-size: 13px; margin-left: 240px;" @click="SupplierDetail">{{$t('查看代理商详情')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
......
...@@ -43,8 +43,8 @@ export default { ...@@ -43,8 +43,8 @@ export default {
(item) => item.areaType == this.areaType (item) => item.areaType == this.areaType
); );
if(this.areaType == 1 || !this.companyType) return allSupplier; if(this.areaType == 1 || !this.companyType) return allSupplier;
return allSupplier.filter((item) => return allSupplier?.filter((item) =>
item.companyTypes.includes(this.companyType) item.companyTypes?.includes(this.companyType)
); );
}, },
}, },
......
...@@ -32,13 +32,22 @@ ...@@ -32,13 +32,22 @@
<el-date-picker v-model="form.followTime" clearable type="datetime" :placeholder="$t('请选择')" :disabled="isView" /> <el-date-picker v-model="form.followTime" clearable type="datetime" :placeholder="$t('请选择')" :disabled="isView" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="customerId">
<el-form-item :label="$t('联系人')" required> <el-form-item :label="$t('联系人')" required>
<el-select v-model="form.contactId" clearable :placeholder="$t('请选择')" :disabled="isView" @change="changeContactUser"> <el-select v-model="form.contactId" clearable :placeholder="$t('请选择')" :disabled="isView" @change="changeContactUser">
<el-option v-for="(item, index) in customerContactsList" :key="index" :label="item.name" :value="item.id"> </el-option> <el-option v-for="(item, index) in customerContactsList" :key="index" :label="item.name" :value="item.id"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-else>
<el-form-item :label="$t('联系人')" required>
<div class="contact">
<el-input :value="form.contactName" placeholder="" disabled />
<img src="@/assets/svg/contacts.svg" class="phonebook" @click="ChooseContactDialog = true" />
</div>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('联系方式')"> <el-form-item :label="$t('联系方式')">
<el-input v-model="form.contactPhone" disabled /> <el-input v-model="form.contactPhone" disabled />
...@@ -136,9 +145,22 @@ ...@@ -136,9 +145,22 @@
<el-button type="success" @click="customerFollowSubmit(1)">{{ $t("提交结果") }}</el-button> <el-button type="success" @click="customerFollowSubmit(1)">{{ $t("提交结果") }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
<choose-contact-dialog v-if="ChooseContactDialog" :type="2" @choose="changeAllContactUser" @close="ChooseContactDialog = false" />
</div> </div>
</template> </template>
<style lang="scss" scoped>
.contact {
display: flex;
align-items: center;
justify-content: center;
img.phonebook {
width: 30px;
height: 30px;
margin-left: 10px;
cursor: pointer;
}
}
</style>
<script> <script>
import { createCustomerFollow, getCustomerFollowPage, getCustomerFollowPage2, addCustomerFollow, getCustomerFollowList, editCustomerFollow, getFollowupNewNumber } from "@/api/ecw/customerFollow" import { createCustomerFollow, getCustomerFollowPage, getCustomerFollowPage2, addCustomerFollow, getCustomerFollowList, editCustomerFollow, getFollowupNewNumber } from "@/api/ecw/customerFollow"
import { getCustomerContactsSelect } from "@/api/ecw/customerContacts" import { getCustomerContactsSelect } from "@/api/ecw/customerContacts"
...@@ -149,7 +171,7 @@ import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/use ...@@ -149,7 +171,7 @@ import { listAllSimpl, listServiceUser, listSimpleUsers } from "@/api/system/use
import { parseTime } from "@/utils/ruoyi" import { parseTime } from "@/utils/ruoyi"
import FileUpload from "@/components/FileUpload/fileUpload" import FileUpload from "@/components/FileUpload/fileUpload"
import { formatDate } from "@/utils/index" import { formatDate } from "@/utils/index"
import { log } from "util" import ChooseContactDialog from "@/components/ChooseContactDialog"
export default { export default {
/** /**
* 客户跟进 * 客户跟进
...@@ -165,10 +187,12 @@ export default { ...@@ -165,10 +187,12 @@ export default {
customerService: Number customerService: Number
}, },
components: { components: {
ChooseContactDialog,
FileUpload FileUpload
}, },
data() { data() {
return { return {
ChooseContactDialog: false,
fileType: ["doc", "xls", "ppt", "txt", "pdf", "png", "jpg", "jpeg"], fileType: ["doc", "xls", "ppt", "txt", "pdf", "png", "jpg", "jpeg"],
DICT_TYPE, DICT_TYPE,
getDictDataLabel, getDictDataLabel,
...@@ -240,6 +264,38 @@ export default { ...@@ -240,6 +264,38 @@ export default {
}) })
} }
}, },
changeAllContactUser(item) {
console.log(item)
if (item) {
this.form.contactName = item.contactsName
this.form.customerId = item.customerId
this.form.contactPhone = "+" + item.areaCode + item.phoneNew
if (item.customerService) this.form.followUserId = item.customerService
if (item.customerNumber) this.form.customerNumber = item.customerNumber
} else {
this.form.contactName = null
this.form.contactPhone = null
}
this.ChooseContactDialog = false
},
changeContactUser(val) {
if (val) {
for (const item of this.customerContactsList) {
if (item.id == val) {
this.form.contactName = item.name
this.form.customerId = item.customerId
this.form.contactPhone = "+" + item.areaCode + item.phoneNew
if (item.customerService) this.form.followUserId = item.customerService
if (item.customerNumber) this.form.customerNumber = item.customerNumber
break
}
}
} else {
this.form.contactName = null
this.form.contactPhone = null
}
},
getOfferList() { getOfferList() {
getOfferPage(this.queryParams).then((response) => { getOfferPage(this.queryParams).then((response) => {
this.offerList = response.data.list this.offerList = response.data.list
...@@ -292,22 +348,6 @@ export default { ...@@ -292,22 +348,6 @@ export default {
} }
} }
}, },
changeContactUser(val) {
if (val) {
for (const item of this.customerContactsList) {
if (item.id == val) {
this.form.contactName = item.name
this.form.customerId = item.customerId
this.form.contactPhone = "+" + item.areaCode + item.phoneNew
if (item.customerNumber) this.form.customerNumber = item.customerNumber
break
}
}
} else {
this.form.contactName = null
this.form.contactPhone = null
}
},
customerFollowSubmit(status) { customerFollowSubmit(status) {
console.log(this.form) console.log(this.form)
this.$refs["customerFollowForm"].validate((valid) => { this.$refs["customerFollowForm"].validate((valid) => {
......
...@@ -109,6 +109,11 @@ ...@@ -109,6 +109,11 @@
<el-form-item :label="$t('入仓时间:')"> <el-form-item :label="$t('入仓时间:')">
<el-date-picker v-model="rucangtime" @change="changeDate" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" /> <el-date-picker v-model="rucangtime" @change="changeDate" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery">
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的国')" prop="destCountryId"> <el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select v-model="destCountryId" multiple :placeholder="$t('请选择目的国')" clearable @change="handleQuery"> <el-select v-model="destCountryId" multiple :placeholder="$t('请选择目的国')" clearable @change="handleQuery">
<el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option> <el-option v-for="item in AddressProvince" :key="item.guojia" :label="item.guojiaName" :value="item.guojia"></el-option>
...@@ -184,10 +189,11 @@ ...@@ -184,10 +189,11 @@
<span style="color: red" v-if="row.isExternalWarehouse">({{ $t("外部仓") }})</span> <span style="color: red" v-if="row.isExternalWarehouse">({{ $t("外部仓") }})</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('运输方式/目的地')" align="center" prop="transportId"> <el-table-column :label="$t('运输方式-渠道/目的仓')" align="center" prop="transportId">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" />
/ {{ row.objectiveName }} <template v-if="row.channelName"> - {{ row.channelName }} </template>
/ {{ row.dstWarehouseName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('控货')" align="center" prop="transportId"> <el-table-column :label="$t('控货')" align="center" prop="transportId">
...@@ -239,9 +245,9 @@ ...@@ -239,9 +245,9 @@
<el-input v-model.trim="queryOfferParams.relationAreaCode" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery" @input="queryOfferParams.relationAreaCode = queryOfferParams.relationAreaCode.replace(/\s+/g, '')" /> <el-input v-model.trim="queryOfferParams.relationAreaCode" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery" @input="queryOfferParams.relationAreaCode = queryOfferParams.relationAreaCode.replace(/\s+/g, '')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="departureId"> <el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select v-model="queryOfferParams.departureId" :placeholder="$t('请选择始发地')" clearable> <el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery">
<el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -308,14 +314,15 @@ ...@@ -308,14 +314,15 @@
<template v-slot="{ row }"> +{{ row.relationAreaCode }}{{ row.relationPhone }} </template> <template v-slot="{ row }"> +{{ row.relationAreaCode }}{{ row.relationPhone }} </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('始发仓')"> <el-table-column :label="$t('始发仓')">
<template v-slot="{ row }"> <template slot-scope="{ row }">
{{ getWarehouse(row.startWarehouseId) }} {{ row.startWarehouseName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('运输方式/目的地')"> <el-table-column :label="$t('运输方式-渠道/目的仓')">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportType" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" />
/ {{ row.objectiveName }} <template v-if="row.channelName"> - {{ row.channelName }} </template>
/ {{ row.destWarehouseName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('销售阶段')"> <el-table-column :label="$t('销售阶段')">
...@@ -693,7 +700,11 @@ export default { ...@@ -693,7 +700,11 @@ export default {
getCurrencyList().then((response) => { getCurrencyList().then((response) => {
this.currecyList = response.data this.currecyList = response.data
}) })
getTradeCityList().then((res) => (this.tradeCityList = res.data)) getWarehouseList().then((res) => {
this.tradeCityList = res.data
this.warehouseList = res.data
})
// getTradeCityList().then((res) => (this.tradeCityList = res.data))
//获取信用类型 //获取信用类型
getCreditRulePage({ page: 1, rows: 999, type: 2 }).then((r) => { getCreditRulePage({ page: 1, rows: 999, type: 2 }).then((r) => {
this.creditTypeList = r.data.list this.creditTypeList = r.data.list
...@@ -827,6 +838,7 @@ export default { ...@@ -827,6 +838,7 @@ export default {
data() { data() {
return { return {
tradeCityList: [], tradeCityList: [],
warehouseList: [],
queryTmp: { queryTmp: {
createTime: ["", ""] createTime: ["", ""]
}, },
...@@ -955,6 +967,10 @@ export default { ...@@ -955,6 +967,10 @@ export default {
exportCityList() { exportCityList() {
return this.tradeCityList.filter((item) => item.type == 2) return this.tradeCityList.filter((item) => item.type == 2)
}, },
exportWarehouseList() {
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
},
permissions() { permissions() {
return this.$store.state.user.permissions return this.$store.state.user.permissions
}, },
......
...@@ -15,25 +15,59 @@ ...@@ -15,25 +15,59 @@
:key="item.id"></el-option> :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseIdArr">
<el-select multiple v-model="queryParams.destWarehouseIdList" multiple
:placeholder="$t('请选择目的仓')" clearable>
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id"
:key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="shippingChannel"> <el-form-item :label="$t('出货渠道')" prop="shippingChannel">
<el-select v-model="queryParams.channelId" :placeholder="$t('请选择出货渠道')" clearable> <el-select v-model="queryParams.channelId" :placeholder="$t('请选择出货渠道')" clearable>
<el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId" <el-option v-for="item in channelList" :label="item.nameZh" :value="item.channelId"
:key="item.channelId"></el-option> :key="item.channelId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label-width="200" label="目的仓国家">
<el-select style="width: 100%" filterable clearable v-model="queryParams.destCountryId" :placeholder="$t('请选择国家')"> <el-form-item :label="$t('目的国')" prop="destCountryId">
<el-option v-for="dict in countryList" <el-select
:key="dict.id" :label="$l(dict,'title')" :value="parseInt(dict.id)"/> v-model="destCountryId"
</el-select> multiple
</el-form-item> :label="destCountryId"
clearable
@change="handleQuery"
>
<el-option
v-for="item in countryList"
:key="item.id"
:label="$l(item, 'title')"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="destCityId">
<el-select v-model="destCityId"
multiple
clearable
@change="handleQuery">
<el-option
v-for="item in AddressCity"
:key="item.shi"
:label="item.shiName"
:value="item.shi"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select v-model="destWarehouseId"
clearable
multiple
@change="handleQuery">
<el-option
v-for="item in AddressTown"
:key="item.id"
:label="item.titleZh"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -97,8 +131,11 @@ import { ...@@ -97,8 +131,11 @@ import {
getPersonTargetPage, getPersonTargetPage,
myAchievementByPage myAchievementByPage
} from "@/api/ecw/deptTarget"; } from "@/api/ecw/deptTarget";
import { getRegionList } from "@/api/ecw/order";
import {listSimpleDepts} from "@/api/system/dept"; import {listSimpleDepts} from "@/api/system/dept";
import {getChannelList} from '@/api/ecw/channel'; import {getChannelList} from '@/api/ecw/channel';
import { getTradeCityList, getListTree } from "@/api/ecw/region";
import { getCityList } from "@/api/ecw/region";
import dayjs from "dayjs"; import dayjs from "dayjs";
import {listServiceUser} from "@/api/system/user"; import {listServiceUser} from "@/api/system/user";
import {getWarehouseList} from '@/api/ecw/warehouse' import {getWarehouseList} from '@/api/ecw/warehouse'
...@@ -111,7 +148,19 @@ export default { ...@@ -111,7 +148,19 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
countryList:[], AddressCity: [], //目的城市
AddressProvince: [], //省份
AddressTown: [], //目的仓
countryList: [], //目的国
warehouseList: [], //目前仓
destCountryId: [],
destCityId: null,
destWarehouseId: "",
objectiveId: [],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 总条数 // 总条数
...@@ -125,6 +174,10 @@ export default { ...@@ -125,6 +174,10 @@ export default {
queryParams: { queryParams: {
page: 1, page: 1,
rows: 10, rows: 10,
destCityId: null, //目的城市
destCountryId: null, //目的国
destWarehouseId: null, //目的仓
objectiveId: null,
}, },
// 表单校验 // 表单校验
...@@ -132,6 +185,168 @@ export default { ...@@ -132,6 +185,168 @@ export default {
warehouseList: [] warehouseList: []
}; };
}, },
watch: {
destCountryId: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.destWarehouseId = "";
this.destCityId = "";
this.findByprovinceCode();
if (this.destCountryId == "") {
//1 是所有区域,2 国家,3是市,
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
}
},
},
destCityId: {
deep: true, //深度监听 目的仓
handler() {
this.AddressTown = [];
this.destWarehouseId = "";
this.findBycityCode();
if (
this.destCityId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId == "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId == "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
}
},
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (
this.destCountryId != "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId == "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
}
},
},
},
computed: { computed: {
DICT_TYPE() { DICT_TYPE() {
return DICT_TYPE return DICT_TYPE
...@@ -154,6 +369,11 @@ export default { ...@@ -154,6 +369,11 @@ export default {
}) })
this.getChannelList(); this.getChannelList();
this.getList(); this.getList();
this.getData();
//获取国家列表
this.getCountryList();
listServiceUser().then(r => { listServiceUser().then(r => {
this.customerServiceList = r.data; this.customerServiceList = r.data;
}) })
...@@ -162,6 +382,62 @@ export default { ...@@ -162,6 +382,62 @@ export default {
}) })
}, },
methods: { methods: {
findByprovinceCode() {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
},
findBycityCode() {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
},
getData() {
//加载时发起请求获取所有省份值
getRegionList(1, 1)
.then(({ data }) => {
this.AddressProvince = data;
})
.catch((error) => {
console.log(error);
});
//目的城市
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
//目的仓
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
},
/* 国家 */
getCountryList() {
getListTree({ treeType: 1 }).then((response) => {
this.countryList = response.data;
});
},
getChannelList() { getChannelList() {
getChannelList().then(res => this.channelList = res.data) getChannelList().then(res => this.channelList = res.data)
}, },
...@@ -187,6 +463,13 @@ export default { ...@@ -187,6 +463,13 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.page = 1; this.queryParams.page = 1;
//目的城市
this.queryParams.destCityId = this.destCityId;
//目的国
this.queryParams.destCountryId = this.destCountryId;
//目的仓
this.queryParams.destWarehouseId = this.destWarehouseId;
this.getList(); this.getList();
}, },
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div slot="header" class="card-title">{{$t('报价单详情')}}</div> <div slot="header" class="card-title">{{$t('报价单详情')}}</div>
<!-- 列表 --> <!-- 列表 -->
<div class="offer-header"> <div class="offer-header">
<span style="font-size: 15px;">{{$t('报价单号')}}{{list.number}}</span> <span style="font-size: 15px;">{{$t('报价单号')}}{{list.number}} - <dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="list.status" /></span>
<div class="btns"> <div class="btns">
<el-button v-hasPermi="['ecw:offer:update']" size="mini" type="primary" v-if="[4,5,6].indexOf(list.status) == -1" @click="$router.push('edit?id=' + offerId)">{{$t('编辑')}}</el-button> <el-button v-hasPermi="['ecw:offer:update']" size="mini" type="primary" v-if="[4,5,6].indexOf(list.status) == -1" @click="$router.push('edit?id=' + offerId)">{{$t('编辑')}}</el-button>
<el-button v-hasPermi="['ecw:offer:loglist']" type="primary" v-if="[1,3,7].indexOf(list.status) > -1" size="mini" @click="handleAdd">{{$t('跟进')}}</el-button> <el-button v-hasPermi="['ecw:offer:loglist']" type="primary" v-if="[1,3,7].indexOf(list.status) > -1" size="mini" @click="handleAdd">{{$t('跟进')}}</el-button>
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
<el-input v-model.trim="queryParams.relationAreaCode" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery" @input="queryParams.relationAreaCode = queryParams.relationAreaCode.replace(/\s+/g, '')" /> <el-input v-model.trim="queryParams.relationAreaCode" :placeholder="$t('请输入客户')" clearable @keyup.enter.native="handleQuery" @input="queryParams.relationAreaCode = queryParams.relationAreaCode.replace(/\s+/g, '')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="departureId"> <el-form-item :label="$t('始发仓')" prop="startWarehouseId">
<el-select v-model="queryParams.departureId" :placeholder="$t('请选择始发地')" clearable> <el-select v-model="queryParams.startWarehouseId" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery">
<el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -124,11 +124,12 @@ ...@@ -124,11 +124,12 @@
<el-table-column :label="$t('联系人')" align="left" prop="relationName" width="120" /> <el-table-column :label="$t('联系人')" align="left" prop="relationName" width="120" />
<el-table-column :label="$t('联系电话')" align="left" prop="relationPhone" width="150" /> <el-table-column :label="$t('联系电话')" align="left" prop="relationPhone" width="150" />
<el-table-column :label="$t('重要程序')" align="center" prop="importance" /> <el-table-column :label="$t('重要程序')" align="center" prop="importance" />
<el-table-column :label="$t('始发地')" align="left" prop="departureName" /> <el-table-column :label="$t('始发仓')" align="left" prop="startWarehouseName" />
<el-table-column :label="$t('目的地')" align="center" prop="objectiveName" /> <el-table-column :label="$t('运输方式-渠道/目的仓')">
<el-table-column :label="$t('运输方式')" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
{{ $l(transportTypes[row.transportType], "label") }} <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" />
<template v-if="row.channelName"> - {{ row.channelName }} </template>
/ {{ row.destWarehouseName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('销售阶段')" align="left" width="100"> <el-table-column :label="$t('销售阶段')" align="left" width="100">
...@@ -141,12 +142,6 @@ ...@@ -141,12 +142,6 @@
<span>{{ parseTime(scope.row.stopTime, "{y}-{m}-{d}") }}</span> <span>{{ parseTime(scope.row.stopTime, "{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('运输方式')" align="left">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="scope.row.transportId" />
</template>
</el-table-column>
<el-table-column :label="$t('预计销售额')" align="left" prop="estCost" width="160"> <el-table-column :label="$t('预计销售额')" align="left" prop="estCost" width="160">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<div class="" v-for="(item, feeIndex) in row.estCostVO.feeDtoList" :key="feeIndex"> <div class="" v-for="(item, feeIndex) in row.estCostVO.feeDtoList" :key="feeIndex">
...@@ -207,11 +202,14 @@ import { getChannelList } from "@/api/ecw/channel" ...@@ -207,11 +202,14 @@ import { getChannelList } from "@/api/ecw/channel"
import { getRegionList } from "@/api/ecw/order" import { getRegionList } from "@/api/ecw/order"
import { getCurrencyList } from "@/api/ecw/currency" import { getCurrencyList } from "@/api/ecw/currency"
import { getTradeCityList } from "@/api/ecw/region" import { getTradeCityList } from "@/api/ecw/region"
import { getWarehouseList } from "@/api/ecw/warehouse"
import UserSelector from "@/components/UserSelector" import UserSelector from "@/components/UserSelector"
import Selector from "@/components/Selector" import Selector from "@/components/Selector"
import Template from "@/views/cms/template/index.vue";
export default { export default {
name: "EcwOfferIndex", name: "EcwOfferIndex",
components: { components: {
Template,
Selector, Selector,
UserSelector UserSelector
}, },
...@@ -243,6 +241,7 @@ export default { ...@@ -243,6 +241,7 @@ export default {
startTime: ["", ""], startTime: ["", ""],
endTime: ["", ""] endTime: ["", ""]
}, },
warehouseList: [],
currencyList: [], currencyList: [],
tradeCityList: [], tradeCityList: [],
channelList: [], channelList: [],
...@@ -271,6 +270,10 @@ export default { ...@@ -271,6 +270,10 @@ export default {
}) })
return map return map
}, },
exportWarehouseList() {
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter((item) => item.tradeType == 2 || item.tradeType == 3)
},
exportCityList() { exportCityList() {
return this.tradeCityList.filter((item) => item.type == 2) return this.tradeCityList.filter((item) => item.type == 2)
}, },
...@@ -296,8 +299,11 @@ export default { ...@@ -296,8 +299,11 @@ export default {
if (this.$route.fullPath.indexOf("dept") > -1) { if (this.$route.fullPath.indexOf("dept") > -1) {
this.dept = true this.dept = true
} }
getTradeCityList().then((res) => (this.tradeCityList = res.data)) // getTradeCityList().then((res) => (this.tradeCityList = res.data))
getWarehouseList().then((res) => {
this.tradeCityList = res.data
this.warehouseList = res.data
})
getCurrencyList().then((res) => { getCurrencyList().then((res) => {
this.currencyList = res.data this.currencyList = res.data
}) })
...@@ -496,6 +502,10 @@ export default { ...@@ -496,6 +502,10 @@ export default {
formatQuery() { formatQuery() {
let obj = {} let obj = {}
//目的国 //目的国
if (this.startWarehouseId != null && this.startWarehouseId != "") {
obj.startWarehouseIds = this.startWarehouseId
}
//目的国
if (this.destCountryId != null && this.destCountryId != "") { if (this.destCountryId != null && this.destCountryId != "") {
obj.destCountryIds = this.destCountryId obj.destCountryIds = this.destCountryId
} }
......
...@@ -13,24 +13,32 @@ ...@@ -13,24 +13,32 @@
<el-divider></el-divider> <el-divider></el-divider>
<el-form label-width="100px" inline> <el-form label-width="100px" inline>
<el-form-item :label="$t('订单号') + ':'" <el-form-item :label="$t('订单号') + ':'"
><div class="content"> >
<div class="content">
{{ orderDetails.orderNo }} {{ orderDetails.orderNo }}
</div></el-form-item </div>
</el-form-item
> >
<el-form-item :label="$t('发货人') + ':'" <el-form-item :label="$t('发货人') + ':'"
><div class="content"> >
<div class="content">
{{ orderDetails.consignorVO ? orderDetails.consignorVO.name : "" }} {{ orderDetails.consignorVO ? orderDetails.consignorVO.name : "" }}
</div></el-form-item </div>
</el-form-item
> >
<el-form-item :label="$t('唛头')" <el-form-item :label="$t('唛头')"
><div class="content">{{ orderDetails.marks }}</div></el-form-item >
<div class="content">{{ orderDetails.marks }}</div>
</el-form-item
> >
<el-form-item> <el-form-item>
<el-button <el-button
:disabled="!!processInstanceId || editMode" :disabled="!!processInstanceId || editMode"
@click="addCost" @click="addCost"
>{{ $t("添加申请") }}</el-button >{{ $t("添加申请") }}
></el-form-item </el-button
>
</el-form-item
> >
</el-form> </el-form>
<el-table :data="list"> <el-table :data="list">
...@@ -105,26 +113,36 @@ ...@@ -105,26 +113,36 @@
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
<template v-slot:default="scope"> <template v-slot:default="scope">
<el-tag v-if="scope.row.status !== 0 && !scope.row.editMode">{{ <el-tag v-if="scope.row.status !== 0 && !scope.row.editMode">{{
STATUS[scope.row.status] STATUS[scope.row.status]
}}</el-tag> }}
</el-tag>
<!--el-button type="text" v-if="scope.row.status == 1" @click="examineFn">{{$t('审核中')}}</el-button--> <!--el-button type="text" v-if="scope.row.status == 1" @click="examineFn">{{$t('审核中')}}</el-button-->
<el-button <el-button
type="text" type="text"
v-if="modifable(scope.$index)" v-if="modifable(scope.$index)"
@click="modify(scope.row)" @click="modify(scope.row)"
>{{ $t("修改") }}</el-button >{{ $t("修改") }}
</el-button
> >
<el-button <el-button
type="text" type="text"
v-if="scope.row.status === 0" v-if="scope.row.status === 0"
@click="del(scope.$index)" @click="del(scope.$index)"
>删除</el-button >删除
</el-button
>
<el-button
type="text"
v-if="scope.row.id && scope.row.applicationFee === 0"
@click="deleteByFeeIsZero(scope.row.id)"
>删除
</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="padding: 20px"> <div style="padding: 20px">
<work-flow xmlkey="free_apply" v-model="selectedUsers" /> <work-flow xmlkey="free_apply" v-model="selectedUsers"/>
</div> </div>
<div style="text-align: center; margin-top: 20px"> <div style="text-align: center; margin-top: 20px">
<el-button <el-button
...@@ -133,25 +151,29 @@ ...@@ -133,25 +151,29 @@
style="margin-right: 30px" style="margin-right: 30px"
:disabled="!feeList.length && !editMode" :disabled="!feeList.length && !editMode"
@click="submit" @click="submit"
>{{ $t("提交") }}</el-button >{{ $t("提交") }}
</el-button
> >
<el-button <el-button
type="primary" type="primary"
v-if="processInstanceId" v-if="processInstanceId"
style="margin-right: 30px" style="margin-right: 30px"
@click="goProcessDetail" @click="goProcessDetail"
>{{ $t("审核中") }}</el-button >{{ $t("审核中") }}
</el-button
> >
<el-button <el-button
type="primary" type="primary"
v-if="processInstanceId" v-if="processInstanceId"
style="margin-right: 30px" style="margin-right: 30px"
@click="cancel" @click="cancel"
>{{ $t("取消审核") }}</el-button >{{ $t("取消审核") }}
</el-button
> >
<el-button @click="$emit('update:dialogVisible', false)">{{ <el-button @click="$emit('update:dialogVisible', false)">{{
$t("返回") $t("返回")
}}</el-button> }}
</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
...@@ -168,13 +190,14 @@ import { ...@@ -168,13 +190,14 @@ import {
getFeeApplicationApproveByOrderId, getFeeApplicationApproveByOrderId,
getBatchFeeByProcessId, getBatchFeeByProcessId,
qetBatchFeeByBusinessId, qetBatchFeeByBusinessId,
getBatchFeeByBusinessId, getBatchFeeByBusinessId, feeApplicationDelete,
} from "@/api/ecw/order"; } from "@/api/ecw/order";
import { getDictDatas, DICT_TYPE } from "@/utils/dict"; import {getDictDatas, DICT_TYPE} from "@/utils/dict";
import workFlow from "@/components/WorkFlow"; import workFlow from "@/components/WorkFlow";
export default { export default {
name: "feeApplication", name: "feeApplication",
components: { workFlow }, components: {workFlow},
props: { props: {
orderId: [Number, String], orderId: [Number, String],
dialogVisible: { dialogVisible: {
...@@ -222,7 +245,7 @@ export default { ...@@ -222,7 +245,7 @@ export default {
if (this.list.findIndex((item) => item.editMode) > -1) return false; if (this.list.findIndex((item) => item.editMode) > -1) return false;
return true; return true;
} }
} }
}, },
created() { created() {
this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach((e) => { this.getDictDatas(this.DICT_TYPE.AUDIT_STATUS).forEach((e) => {
...@@ -234,7 +257,7 @@ export default { ...@@ -234,7 +257,7 @@ export default {
}); });
// 查询历史申请 // 查询历史申请
feeApplicationListByOrderId({ orderId: this.orderId }).then((res) => { feeApplicationListByOrderId({orderId: this.orderId}).then((res) => {
this.list = res.data; this.list = res.data;
}); });
...@@ -270,6 +293,17 @@ export default { ...@@ -270,6 +293,17 @@ export default {
status: 0, status: 0,
}); });
}, },
deleteByFeeIsZero(id) {
this.$confirm(this.$t("确定要删除此条费用申请么?")).then(() => {
feeApplicationDelete(id).then((r) => {
this.$message({
type: "success",
message: this.$t("删除成功"),
});
this.$emit("update:dialogVisible", false);
});
});
},
submit() { submit() {
// 判断费用申请是否有未填项 // 判断费用申请是否有未填项
const errList = this.feeList.filter((item) => { const errList = this.feeList.filter((item) => {
...@@ -319,7 +353,7 @@ export default { ...@@ -319,7 +353,7 @@ export default {
confirmButtonText: this.$t("确定"), confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"), cancelButtonText: this.$t("取消"),
}) })
.then(({ value }) => { .then(({value}) => {
let item = this.list.find((e) => e.status === 1); let item = this.list.find((e) => e.status === 1);
feeApplicationCancel({ feeApplicationCancel({
huifu: value, huifu: value,
...@@ -332,7 +366,8 @@ export default { ...@@ -332,7 +366,8 @@ export default {
this.$emit("update:dialogVisible", false); this.$emit("update:dialogVisible", false);
}); });
}) })
.catch(() => {}); .catch(() => {
});
}, },
}, },
watch: { watch: {
...@@ -353,14 +388,17 @@ export default { ...@@ -353,14 +388,17 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.fee-application { .fee-application {
padding: 0 20px; padding: 0 20px;
h1 { h1 {
font-weight: 600; font-weight: 600;
font-size: 20px; font-size: 20px;
} }
.content { .content {
width: 200px; width: 200px;
} }
} }
.my-process-designer { .my-process-designer {
height: calc(100vh - 200px); height: calc(100vh - 200px);
} }
......
<template> <template>
<div style="display: inline-block;margin-right: 10px"> <div style="display: inline-block; margin-right: 10px">
<el-button size="mini" @click="visible = true" type="text">{{ title }}</el-button> <el-button size="mini" @click="visible = true" type="text">{{ title }}</el-button>
<el-dialog <el-dialog :title="title + ' - ' + warehousing.orderNo" :visible.sync="visible" width="100%">
:title="title + ' - ' + warehousing.orderNo"
:visible.sync="visible"
width="100%"
>
<el-tabs v-model="activeName" type="card"> <el-tabs v-model="activeName" type="card">
<el-tab-pane :label="edit ? $t('货物修改') : $t('货物入仓')" name="first"> <el-tab-pane :label="edit ? $t('货物修改') : $t('货物入仓')" name="first">
<el-form ref="form" :model="form" :rules="formRules" label-width="80px"> <el-form ref="form" :model="form" :rules="formRules" label-width="80px">
<el-descriptions border :column="2"> <el-descriptions border :column="2">
<el-descriptions-item> <el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template> <template slot="label"><span style="color: red">*</span>{{ $t("中文品名") }}</template>
<span style="min-width: 200px;margin-right: 15px;display: inline-block"> <span style="min-width: 200px; margin-right: 15px; display: inline-block">
<product-selector v-if="(!order.parentOrderId && !isAdd) || order.splitSeparateOrder" v-model="form.prodId" @change="onProductChange" determined protect-once/> <product-selector v-if="(!order.parentOrderId && !isAdd) || order.splitSeparateOrder" v-model="form.prodId" @change="onProductChange" determined protect-once />
<span v-else>{{ warehousing.prodTitleZh }}</span> <span v-else>{{ warehousing.prodTitleZh }}</span>
</span> </span>
<el-button v-if="(!order.parentOrderId && !isAdd) || order.splitSeparateOrder" type="text" @click="isShowProduct = true">添加新商品</el-button> <el-button v-if="(!order.parentOrderId && !isAdd) || order.splitSeparateOrder" type="text" @click="isShowProduct = true">添加新商品</el-button>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template> <template slot="label"><span style="color: red">*</span>{{ $t("英文品名") }}</template>
<product-selector v-if="(!order.parentOrderId && !isAdd) || order.splitSeparateOrder" lang="En" v-model="form.prodId" @change="onProductChange" determined protect-once/> <product-selector v-if="(!order.parentOrderId && !isAdd) || order.splitSeparateOrder" lang="En" v-model="form.prodId" @change="onProductChange" determined protect-once />
<span v-else>{{ warehousing.prodTitleEn }}</span> <span v-else>{{ warehousing.prodTitleEn }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('品牌')"> <el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template> <template slot="label"><span style="color: red">*</span>{{ $t("品牌") }}</template>
<el-form-item required label="" prop="brand" label-width="0"> <el-form-item required label="" prop="brand" label-width="0">
<el-select <el-select v-model="form.brand" :placeholder="$t('可修改')" filterable remote @change="handleBrandChange" :remote-method="getProductBrandPage" clearable>
v-model="form.brand" <el-option v-for="item in brandList" :key="item.id" :label="item.titleZh" :value="item.id"> </el-option>
:placeholder="$t('可修改')"
filterable
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage"
clearable>
<el-option
v-for="item in brandList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('是否备案')"> <el-descriptions-item :label="$t('是否备案')">
<template slot="label"><span style="color: red">*</span>{{ $t('是否备案') }}</template> <template slot="label"><span style="color: red">*</span>{{ $t("是否备案") }}</template>
{{ isBeian }} {{ isBeian }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('收费模式')"> <el-descriptions-item :label="$t('收费模式')">
<template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template> <template slot="label"><span style="color: red">*</span>{{ $t("收费模式") }}</template>
{{ feeType }} {{ feeType }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('填单参数')">{{ $t('箱数:') }}<el-input size="mini" v-if="edit" v-model="warehousing.num" style="display: inline-block;width: 100px"></el-input> <el-descriptions-item :label="$t('填单参数')"
<span v-else>{{ warehousing.num }}</span><br>{{ $t('体积:') }}<el-input size="mini" v-if="edit" v-model="warehousing.volume" style="display: inline-block;width: 100px"></el-input> >{{ $t("箱数:") }}<el-input size="mini" v-if="edit" v-model="warehousing.num" style="display: inline-block; width: 100px"></el-input> <span v-else>{{ warehousing.num }}</span
<span v-else>{{ warehousing.volume }}</span><br>{{ $t('重量:') }}<el-input size="mini" v-if="edit" v-model="warehousing.weight" style="display: inline-block;width: 100px"></el-input> ><br />{{ $t("体积:") }}<el-input size="mini" v-if="edit" v-model="warehousing.volume" style="display: inline-block; width: 100px"></el-input> <span v-else>{{ warehousing.volume }}</span
<span v-else>{{ warehousing.weight }}</span>Kg ><br />{{ $t("重量:") }}<el-input size="mini" v-if="edit" v-model="warehousing.weight" style="display: inline-block; width: 100px"></el-input> <span v-else>{{ warehousing.weight }}</span
>Kg
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-row> <el-row>
...@@ -78,7 +63,7 @@ ...@@ -78,7 +63,7 @@
<el-col :span="16"> <el-col :span="16">
<el-form-item :label="$t('用途')"> <el-form-item :label="$t('用途')">
<el-checkbox-group v-model="form.usageIds"> <el-checkbox-group v-model="form.usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value">{{ $l(item, 'label') }}</el-checkbox> <el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value">{{ $l(item, "label") }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -87,18 +72,15 @@ ...@@ -87,18 +72,15 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{ $t('入仓记录') }}</span> <span>{{ $t("入仓记录") }}</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete" :disabled="form.table.length < protectRowCount"></el-button> <el-button style="float: right; margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete" :disabled="form.table.length < protectRowCount"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button> <el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</div> </div>
<el-form ref="tableForm" :rules="tableFormRules" :model="form" size="mini"> <el-form ref="tableForm" :rules="tableFormRules" :model="form" size="mini">
<el-table <el-table :data="form.table" style="width: 100%">
:data="form.table"
style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px"> <el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header> <template v-slot:header> <span style="color: red">*</span>{{ $t("箱数") }}</template>
<span style="color: red">*</span>{{ $t('箱数') }}</template> <template v-slot="{ r, c, $index }">
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.cartonsNum"> <el-form-item :rules="tableFormRules.cartonsNum">
<el-input v-model="form.table[$index].cartonsNum" placeholder="" @blur="handleVolume($index)" :disabled="$index < protectRowCount"> <el-input v-model="form.table[$index].cartonsNum" placeholder="" @blur="handleVolume($index)" :disabled="$index < protectRowCount">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, form.table[$index].specificationType) }}</span> <span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, form.table[$index].specificationType) }}</span>
...@@ -108,9 +90,8 @@ ...@@ -108,9 +90,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('包装类型')" width="100px"> <el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header> <template v-slot:header> <span style="color: red">*</span>{{ $t("包装类型") }}</template>
<span style="color: red">*</span>{{ $t('包装类型') }}</template> <template v-slot="{ r, c, $index }">
<template v-slot="{r,c,$index}">
<el-form-item> <el-form-item>
<dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form.table[$index].unit"></dict-selector> <dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form.table[$index].unit"></dict-selector>
</el-form-item> </el-form-item>
...@@ -118,9 +99,10 @@ ...@@ -118,9 +99,10 @@
</el-table-column> </el-table-column>
<el-table-column label="长(cm)"> <el-table-column label="长(cm)">
<template v-slot:header> <template v-slot:header>
<span>{{ $t('') }}</span>(cm) <span>{{ $t("") }}</span
>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.boxGauge1"> <el-form-item :rules="tableFormRules.boxGauge1">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input> <el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item> </el-form-item>
...@@ -128,9 +110,10 @@ ...@@ -128,9 +110,10 @@
</el-table-column> </el-table-column>
<el-table-column label="宽(cm)"> <el-table-column label="宽(cm)">
<template v-slot:header> <template v-slot:header>
<span>{{ $t('') }}</span>(cm) <span>{{ $t("") }}</span
>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.boxGauge2"> <el-form-item :rules="tableFormRules.boxGauge2">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input> <el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item> </el-form-item>
...@@ -138,9 +121,10 @@ ...@@ -138,9 +121,10 @@
</el-table-column> </el-table-column>
<el-table-column label="高(cm)"> <el-table-column label="高(cm)">
<template v-slot:header> <template v-slot:header>
<span>{{ $t('') }}</span>(cm) <span>{{ $t("") }}</span
>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.boxGauge3"> <el-form-item :rules="tableFormRules.boxGauge3">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input> <el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item> </el-form-item>
...@@ -148,9 +132,10 @@ ...@@ -148,9 +132,10 @@
</el-table-column> </el-table-column>
<el-table-column label="体积(m³)"> <el-table-column label="体积(m³)">
<template v-slot:header> <template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³) <span style="color: red">*</span> <span>{{ $t("体积") }}</span
>(m³)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.volume"> <el-form-item :rules="tableFormRules.volume">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].volume" placeholder="" type="number"></el-input> <el-input :disabled="$index < protectRowCount" v-model="form.table[$index].volume" placeholder="" type="number"></el-input>
</el-form-item> </el-form-item>
...@@ -158,57 +143,47 @@ ...@@ -158,57 +143,47 @@
</el-table-column> </el-table-column>
<el-table-column label="重量(Kg)"> <el-table-column label="重量(Kg)">
<template v-slot:header> <template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg) <span style="color: red">*</span> <span>{{ $t("重量") }}</span
>(Kg)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.weight"> <el-form-item :rules="tableFormRules.weight">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].weight" placeholder="" type="number"></el-input> <el-input :disabled="$index < protectRowCount" v-model="form.table[$index].weight" placeholder="" type="number"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('数量')" width="140px"> <el-table-column :label="$t('数量')" width="140px">
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item :rules="tableFormRules.quantityAll"> <el-form-item :rules="tableFormRules.quantityAll">
<el-input :disabled="$index < protectRowCount" v-model.number="form.table[$index].quantityAll" placeholder="" type="number"> <el-input :disabled="$index < protectRowCount" v-model.number="form.table[$index].quantityAll" placeholder="" type="number">
<template slot="append">{{ $t('') }}</template> <template slot="append">{{ $t("") }}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('快递单号')"> <el-table-column :label="$t('快递单号')">
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item> <el-form-item>
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].expressNo" placeholder=""></el-input> <el-input :disabled="$index < protectRowCount" v-model="form.table[$index].expressNo" placeholder=""></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px"> <el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<warehouse-area-select <warehouse-area-select v-if="visible" v-model="form.table[$index].orderLocationBackVOList" :order-id="orderId" :order-item-id="warehousing.orderItemId" :warehouse-in-id="form.table[$index].id" :warehouse-id="warehouseId" :is-editing="edit"></warehouse-area-select>
v-if="visible"
v-model="form.table[$index].orderLocationBackVOList"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="form.table[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('备注')"> <el-table-column :label="$t('备注')">
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item> <el-form-item>
<el-input v-model="form.table[$index].remark" type="textarea" show-word-limit maxlength="100" placeholder="" :disabled="$index < protectRowCount"></el-input> <el-input v-model="form.table[$index].remark" type="textarea" show-word-limit maxlength="100" placeholder="" :disabled="$index < protectRowCount"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}"> <template v-slot="{ row, column, $index }">
<WarehouseRecordDetail v-model="form.table[$index].orderWarehouseInDetailsVOList" :readonly="$index < protectRowCount" /> <WarehouseRecordDetail v-model="form.table[$index].orderWarehouseInDetailsVOList" :readonly="$index < protectRowCount" />
<el-popconfirm <el-popconfirm v-if="$index >= protectRowCount" title="确定要删除该行入仓记录吗?" @confirm="handleDeleteRow($index)">
v-if="$index >= protectRowCount"
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index)"
>
<template v-slot:reference> <template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button> <el-button size="mini" type="danger">删除</el-button>
</template> </template>
...@@ -216,74 +191,52 @@ ...@@ -216,74 +191,52 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form> </el-form>
</el-card> </el-card>
<el-card style="margin-top: 15px">
<el-card style="margin-top: 15px;">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span style="font-size: 18px"><span style="color: red">*</span>{{$t('入仓影像')}}</span> <span style="font-size: 18px"><span style="color: red">*</span>{{ $t("入仓影像") }}</span>
</div> </div>
<div> <div>
<image-and-video-upload <image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.pictureUrls" :id="orderItemId" :type="5" @delete="handleImageDelete"></image-and-video-upload>
:fileSize="50"
:isShowTip="true"
v-model="form.pictureUrls"
:id="orderItemId"
:type="5"
@delete="handleImageDelete"
></image-and-video-upload>
</div> </div>
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('添加新品名')" name="second" v-if="!edit"> <el-tab-pane :label="$t('添加新品名')" name="second" v-if="!edit">
<el-form ref="form1" :model="form1" :rules="formRules" label-width="80px"> <el-form ref="form1" :model="form1" :rules="formRules" label-width="80px">
<el-descriptions border :column="2"> <el-descriptions border :column="2">
<el-descriptions-item> <el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template> <template slot="label"><span style="color: red">*</span>{{ $t("中文品名") }}</template>
<el-form-item required label="" prop="prodId" label-width="0"> <el-form-item required label="" prop="prodId" label-width="0">
<product-selector v-model="form1.prodId" @change="onProductChange1"/> <product-selector v-model="form1.prodId" @change="onProductChange1" />
<el-button type="text" @click="isShowProduct = true" style="margin-left: 15px">添加新商品</el-button> <el-button type="text" @click="isShowProduct = true" style="margin-left: 15px">添加新商品</el-button>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template> <template slot="label"><span style="color: red">*</span>{{ $t("英文品名") }}</template>
<el-form-item required label="" prop="prodId" label-width="0"> <el-form-item required label="" prop="prodId" label-width="0">
<product-selector lang="En" v-model="form1.prodId" @change="onProductChange1"/> <product-selector lang="En" v-model="form1.prodId" @change="onProductChange1" />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('品牌')"> <el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template> <template slot="label"><span style="color: red">*</span>{{ $t("品牌") }}</template>
<el-form-item required label="" prop="brand" label-width="0"> <el-form-item required label="" prop="brand" label-width="0">
<el-select <el-select v-model="form1.brand" :placeholder="$t('可修改')" filterable remote @change="handleBrandChange" :remote-method="getProductBrandPage1" clearable>
v-model="form1.brand" <el-option v-for="item in brandList1" :key="item.id" :label="item.titleZh" :value="item.id"> </el-option>
:placeholder="$t('可修改')"
filterable
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage1"
clearable>
<el-option
v-for="item in brandList1"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('是否备案')"> <el-descriptions-item :label="$t('是否备案')">
<template slot="label"><span style="color: red">*</span>{{ $t('是否备案') }}</template> <template slot="label"><span style="color: red">*</span>{{ $t("是否备案") }}</template>
{{ isBeian1 }} {{ isBeian1 }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('收费模式')"> <el-descriptions-item :label="$t('收费模式')">
<template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template> <template slot="label"><span style="color: red">*</span>{{ $t("收费模式") }}</template>
{{ feeType1 }} {{ feeType1 }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('填单参数')">{{ $t('非填单货物') }}</el-descriptions-item> <el-descriptions-item :label="$t('填单参数')">{{ $t("非填单货物") }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
...@@ -307,7 +260,7 @@ ...@@ -307,7 +260,7 @@
<el-col :span="16"> <el-col :span="16">
<el-form-item :label="$t('用途')"> <el-form-item :label="$t('用途')">
<el-checkbox-group v-model="form1.usageIds"> <el-checkbox-group v-model="form1.usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value">{{ $l(item, 'label') }}</el-checkbox> <el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value">{{ $l(item, "label") }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -316,18 +269,15 @@ ...@@ -316,18 +269,15 @@
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{ $t('入仓记录') }}</span> <span>{{ $t("入仓记录") }}</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete(1)"></el-button> <el-button style="float: right; margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete(1)"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd(1)"></el-button> <el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd(1)"></el-button>
</div> </div>
<el-form ref="tableForm1" :model="form1" :rules="tableFormRules" size="mini"> <el-form ref="tableForm1" :model="form1" :rules="tableFormRules" size="mini">
<el-table <el-table :data="form1.table" style="width: 100%">
:data="form1.table"
style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px"> <el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header> <template v-slot:header> <span style="color: red">*</span>{{ $t("箱数") }}</template>
<span style="color: red">*</span>{{ $t('箱数') }}</template> <template v-slot="{ r, c, $index }">
<template v-slot="{r,c,$index}">
<el-form-item> <el-form-item>
<span v-if="form1.table[$index].id"> <span v-if="form1.table[$index].id">
{{ form1.table[$index].cartonsNum }} {{ form1.table[$index].cartonsNum }}
...@@ -341,9 +291,8 @@ ...@@ -341,9 +291,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('包装类型')" width="100px"> <el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header> <template v-slot:header> <span style="color: red">*</span>{{ $t("包装类型") }}</template>
<span style="color: red">*</span>{{ $t('包装类型') }}</template> <template v-slot="{ r, c, $index }">
<template v-slot="{r,c,$index}">
<el-form-item> <el-form-item>
<span v-if="form1.table[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}</span> <span v-if="form1.table[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}</span>
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form1.table[$index].unit"></dict-selector> <dict-selector v-else :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form1.table[$index].unit"></dict-selector>
...@@ -352,42 +301,46 @@ ...@@ -352,42 +301,46 @@
</el-table-column> </el-table-column>
<el-table-column label="长(cm)"> <el-table-column label="长(cm)">
<template v-slot:header> <template v-slot:header>
<span>{{ $t('') }}</span>(cm) <span>{{ $t("") }}</span
>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item> <el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[0] : '' }}</span> <span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split("*")[0] : "" }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index, 1)"></el-input> <el-input v-else type="number" v-model="form1.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="宽(cm)"> <el-table-column label="宽(cm)">
<template v-slot:header> <template v-slot:header>
<span>{{ $t('') }}</span>(cm) <span>{{ $t("") }}</span
>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item> <el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[1] : '' }}</span> <span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split("*")[1] : "" }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index, 1)"></el-input> <el-input v-else type="number" v-model="form1.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="高(cm)"> <el-table-column label="高(cm)">
<template v-slot:header> <template v-slot:header>
<span>{{ $t('') }}</span>(cm) <span>{{ $t("") }}</span
>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item> <el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[2] : '' }}</span> <span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split("*")[2] : "" }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index, 1)"></el-input> <el-input v-else type="number" v-model="form1.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="体积(m³)"> <el-table-column label="体积(m³)">
<template v-slot:header> <template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³) <span style="color: red">*</span> <span>{{ $t("体积") }}</span
>(m³)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item> <el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].volume }}</span> <span v-if="form1.table[$index].id">{{ form1.table[$index].volume }}</span>
<el-input v-else type="number" v-model="form1.table[$index].volume" placeholder=""></el-input> <el-input v-else type="number" v-model="form1.table[$index].volume" placeholder=""></el-input>
...@@ -396,9 +349,10 @@ ...@@ -396,9 +349,10 @@
</el-table-column> </el-table-column>
<el-table-column label="重量(Kg)"> <el-table-column label="重量(Kg)">
<template v-slot:header> <template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg) <span style="color: red">*</span> <span>{{ $t("重量") }}</span
>(Kg)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item> <el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].weight }}</span> <span v-if="form1.table[$index].id">{{ form1.table[$index].weight }}</span>
<el-input v-else type="number" v-model="form1.table[$index].weight" placeholder=""></el-input> <el-input v-else type="number" v-model="form1.table[$index].weight" placeholder=""></el-input>
...@@ -406,42 +360,32 @@ ...@@ -406,42 +360,32 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('数量')" width="140px"> <el-table-column :label="$t('数量')" width="140px">
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item> <el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].quantityAll }}</span> <span v-if="form1.table[$index].id">{{ form1.table[$index].quantityAll }}</span>
<el-input v-else type="number" v-model.number="form1.table[$index].quantityAll" placeholder=""> <el-input v-else type="number" v-model.number="form1.table[$index].quantityAll" placeholder="">
<template slot="append">{{ $t('') }}</template> <template slot="append">{{ $t("") }}</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('快递单号')"> <el-table-column :label="$t('快递单号')">
<template v-slot="{r,c,$index}"> <template v-slot="{ r, c, $index }">
<el-form-item> <el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].expressNo }}</span> <span v-if="form1.table[$index].id">{{ form1.table[$index].expressNo }}</span>
<el-input v-else v-model="form1.table[$index].expressNo" placeholder=""></el-input> <el-input v-else v-model="form1.table[$index].expressNo" placeholder=""></el-input>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px"> <el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<warehouse-area-select <warehouse-area-select v-model="form1.table[$index].orderLocationBackVOList" :readonly="form1.table[$index].id && !edit" :order-id="orderId" :order-item-id="warehousing.orderItemId" :warehouse-in-id="form1.table[$index].id" :warehouse-id="warehouseId" :is-editing="edit"></warehouse-area-select>
v-model="form1.table[$index].orderLocationBackVOList"
:readonly="form1.table[$index].id && !edit"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="form1.table[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}"> <template v-slot="{ row, column, $index }">
<WarehouseRecordDetail v-model="form1.table[$index].orderWarehouseInDetailsVOList" /> <WarehouseRecordDetail v-model="form1.table[$index].orderWarehouseInDetailsVOList" />
<el-popconfirm <el-popconfirm title="确定要删除该行入仓记录吗?" @confirm="handleDeleteRow($index, 1)">
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index, 1)"
>
<template v-slot:reference> <template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button> <el-button size="mini" type="danger">删除</el-button>
</template> </template>
...@@ -452,37 +396,34 @@ ...@@ -452,37 +396,34 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card style="margin-top: 15px">
<el-card style="margin-top: 15px;">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span style="font-size: 18px"><span style="color: red">*</span>{{$t('入仓影像')}}</span> <span style="font-size: 18px"><span style="color: red">*</span>{{ $t("入仓影像") }}</span>
</div> </div>
<div> <div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form1.pictureUrls" ></image-and-video-upload> <image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form1.pictureUrls"></image-and-video-upload>
</div> </div>
</el-card> </el-card>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div v-if="edit && order.status !== 3"> <div v-if="edit && order.status !== 3">
<h2>{{ $t('审批流程') }}</h2> <h2>{{ $t("审批流程") }}</h2>
<work-flow xmlkey="free_apply" v-model="selectedUsers" /> <work-flow xmlkey="free_apply" v-model="selectedUsers" />
<!-- <div>选择的用户:{{selectedUsers}}</div>--> <!-- <div>选择的用户:{{selectedUsers}}</div>-->
</div> </div>
<span slot="footer"> <span slot="footer">
<template v-if="!isEditing"> <template v-if="!isEditing">
<el-button @click="handleClose">{{ $t('关 闭') }}</el-button> <el-button @click="handleClose">{{ $t("关 闭") }}</el-button>
<el-button type="primary" :loading="submitting" @click="handleSubmit()">{{ edit ? $t('确认修改') : $t('提 交') }}</el-button> <el-button type="primary" :loading="submitting" @click="handleSubmit()">{{ edit ? $t("确认修改") : $t("提 交") }}</el-button>
</template> </template>
<template v-else> <template v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + formId)">{{ $t('审核中') }}</el-button> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + formId)">{{ $t("审核中") }}</el-button>
<el-button type="primary" @click="handleCancelProcessInstance">{{ $t('取消审核') }}</el-button> <el-button type="primary" @click="handleCancelProcessInstance">{{ $t("取消审核") }}</el-button>
<el-button @click="handleClose">{{ $t('返回') }}</el-button> <el-button @click="handleClose">{{ $t("返回") }}</el-button>
</template>
<template v-else>
</template> </template>
<template v-else> </template>
</span> </span>
</el-dialog> </el-dialog>
...@@ -510,8 +451,8 @@ ...@@ -510,8 +451,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="productSubmit">{{$t('确定')}}</el-button> <el-button type="primary" @click="productSubmit">{{ $t("确定") }}</el-button>
<el-button @click="productCancel">{{$t('取消')}}</el-button> <el-button @click="productCancel">{{ $t("取消") }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -520,18 +461,14 @@ ...@@ -520,18 +461,14 @@
<script> <script>
import ProductSelector from "@/components/ProductSelector" import ProductSelector from "@/components/ProductSelector"
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect" import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {getFeeTypeByOrderProduct, getProductBrankPage} from "@/api/ecw/productBrank" import { getFeeTypeByOrderProduct, getProductBrankPage } from "@/api/ecw/productBrank"
import {cancelProcessInstance} from "@/api/bpm/processInstance" import { cancelProcessInstance } from "@/api/bpm/processInstance"
import WorkFlow from "@/components/WorkFlow" import WorkFlow from "@/components/WorkFlow"
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict" import { DICT_TYPE, getDictDataLabel, getDictDatas } from "@/utils/dict"
import { import { orderWarehouseIn, orderWarehouseInUpdateApply, warehousePictureDelete, warehousePictureList } from "@/api/ecw/order"
orderWarehouseIn, import { getProductAttrList } from "@/api/ecw/productAttr"
orderWarehouseInUpdateApply, warehousePictureDelete, import { getProductTypeList } from "@/api/ecw/productType"
warehousePictureList import { addProduct } from "@/api/ecw/product"
} from "@/api/ecw/order"
import {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType"
import {addProduct} from "@/api/ecw/product"
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue" import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue"
import WarehouseRecordDetail from "@/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue" import WarehouseRecordDetail from "@/views/ecw/order/warehousing/components/WarehouseRecordDetail.vue"
...@@ -595,83 +532,83 @@ export default { ...@@ -595,83 +532,83 @@ export default {
isAdd() { isAdd() {
return this.$route.path === "/order/warehousing-add" return this.$route.path === "/order/warehousing-add"
}, },
warehousing(){ warehousing() {
return {...this.orderItemA, ...this.orderItemB} return { ...this.orderItemA, ...this.orderItemB }
}, },
orderId(){ orderId() {
return this.order.orderId return this.order.orderId
}, },
orderItemId(){ orderItemId() {
return this.warehousing.orderItemId return this.warehousing.orderItemId
}, },
brandObject(){ brandObject() {
return this.brandList.find(e => e.id === this.form.brand) || '' return this.brandList.find((e) => e.id === this.form.brand) || ""
}, },
brandObject1(){ brandObject1() {
return this.brandList.find(e => e.id === this.form1.brand) || '' return this.brandList.find((e) => e.id === this.form1.brand) || ""
}, },
isBeian(){ isBeian() {
if (this.form.recordMode !== undefined){ if (this.form.recordMode !== undefined) {
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.form.recordMode] return [this.$t("无备案"), this.$t("有备案"), this.$t("中性")][this.form.recordMode]
} }
if (this.brandObject.filing){ if (this.brandObject.filing) {
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.brandObject.filing] return [this.$t("无备案"), this.$t("有备案"), this.$t("中性")][this.brandObject.filing]
} else { } else {
return '' return ""
} }
}, },
isBeian1(){ isBeian1() {
if (this.form1.recordMode !== undefined){ if (this.form1.recordMode !== undefined) {
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.form1.recordMode] return [this.$t("无备案"), this.$t("有备案"), this.$t("中性")][this.form1.recordMode]
} }
if (this.brandObject1.filing){ if (this.brandObject1.filing) {
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.brandObject1.filing] return [this.$t("无备案"), this.$t("有备案"), this.$t("中性")][this.brandObject1.filing]
} else { } else {
return '' return ""
} }
}, },
/** /**
* 收费模式 * 收费模式
* @returns {string} 无牌价0,有牌价1,中性品牌价2 * @returns {string} 无牌价0,有牌价1,中性品牌价2
*/ */
feeType(){ feeType() {
const feeType = this.form.feeType const feeType = this.form.feeType
if (feeType >= 0 && feeType < 3) { if (feeType >= 0 && feeType < 3) {
return [this.$t('无牌价'), this.$t('有牌价'), this.$t('中性品牌价')][feeType] return [this.$t("无牌价"), this.$t("有牌价"), this.$t("中性品牌价")][feeType]
} }
return '' return ""
}, },
feeType1(){ feeType1() {
const feeType = parseInt(this.form1.feeType) const feeType = parseInt(this.form1.feeType)
if (feeType >= 0 && feeType < 3) { if (feeType >= 0 && feeType < 3) {
return [this.$t('无牌价'), this.$t('有牌价'), this.$t('中性品牌价')][feeType] return [this.$t("无牌价"), this.$t("有牌价"), this.$t("中性品牌价")][feeType]
} }
return '' return ""
}, },
warehouseId(){ warehouseId() {
return this.order.adjustToDestWarehouseId || this.order?.logisticsInfoDto?.startWarehouseId return this.order.adjustToDestWarehouseId || this.order?.logisticsInfoDto?.startWarehouseId
} }
}, },
watch: { watch: {
visible(val){ visible(val) {
if (val) { if (val) {
this.init() this.init()
this.getProductBrandPage(this.warehousing.brandName) this.getProductBrandPage(this.warehousing.brandName)
this.getProductBrandPage1() this.getProductBrandPage1()
this.handleBrandChange(parseInt(this.form.brand)) this.handleBrandChange(parseInt(this.form.brand))
} else { } else {
this.$emit('close') this.$emit("close")
} }
} }
}, },
data(){ data() {
return { return {
DICT_TYPE, DICT_TYPE,
getDictDataLabel, getDictDataLabel,
getDictDatas, getDictDatas,
activeName: 'first', activeName: "first",
visible: false, visible: false,
submitting: false, submitting: false,
form: { form: {
...@@ -717,8 +654,8 @@ export default { ...@@ -717,8 +654,8 @@ export default {
brandList: [], brandList: [],
brandList1: [], brandList1: [],
formRules: { formRules: {
prodId: [{required: true, message: this.$t("请选择品名"), trigger: "change"}], prodId: [{ required: true, message: this.$t("请选择品名"), trigger: "change" }],
brand: [{required: true, message: this.$t("请选择品牌"), trigger: "change"}], brand: [{ required: true, message: this.$t("请选择品牌"), trigger: "change" }]
}, },
tableFormRules: { tableFormRules: {
// cartonsNum: [{required: true, message: this.$t("箱数不能为空"), trigger: "change"}], // cartonsNum: [{required: true, message: this.$t("箱数不能为空"), trigger: "change"}],
...@@ -730,13 +667,12 @@ export default { ...@@ -730,13 +667,12 @@ export default {
// // quantityAll: [{required: true, message: this.$t("数量不能为空"), trigger: "change"}] // // quantityAll: [{required: true, message: this.$t("数量不能为空"), trigger: "change"}]
}, },
selectedUsers: undefined, selectedUsers: undefined,
// 入仓修改正在审核中 // 入仓修改正在审核中
isEditing: false, isEditing: false,
// 审批业务id // 审批业务id
formId: '', formId: "",
// 追加时被保护的行数 // 追加时被保护的行数
protectRowCount: -1, protectRowCount: -1,
...@@ -753,7 +689,7 @@ export default { ...@@ -753,7 +689,7 @@ export default {
typeId: [{ required: true, message: this.$t("商品类型不能为空"), trigger: "change" }], typeId: [{ required: true, message: this.$t("商品类型不能为空"), trigger: "change" }],
// attrArray: [{ required: true, message: this.$t("商品特性不能为空"), trigger: "change" }], // attrArray: [{ required: true, message: this.$t("商品特性不能为空"), trigger: "change" }],
titleZh: [{ required: true, message: this.$t("中文标题不能为空"), trigger: "blur" }], titleZh: [{ required: true, message: this.$t("中文标题不能为空"), trigger: "blur" }],
titleEn: [{ required: true, message: this.$t("英文标题不能为空"), trigger: "blur" }], titleEn: [{ required: true, message: this.$t("英文标题不能为空"), trigger: "blur" }]
}, },
//类型列表 //类型列表
typeList: [], typeList: [],
...@@ -763,7 +699,7 @@ export default { ...@@ -763,7 +699,7 @@ export default {
}, },
methods: { methods: {
init(){ init() {
this.form.brandType = this.warehousing.brandType this.form.brandType = this.warehousing.brandType
this.form.orderId = this.warehousing.orderId this.form.orderId = this.warehousing.orderId
this.form.orderItemId = this.warehousing.orderNo this.form.orderItemId = this.warehousing.orderNo
...@@ -775,13 +711,10 @@ export default { ...@@ -775,13 +711,10 @@ export default {
this.form.orderId = this.warehousing.orderId this.form.orderId = this.warehousing.orderId
this.form.orderItemId = this.warehousing.orderItemId this.form.orderItemId = this.warehousing.orderItemId
this.form.orderNo = this.warehousing.orderNo this.form.orderNo = this.warehousing.orderNo
if ((this.edit || this.isAdd) && this.warehousing.warehouseInProdAttrIds !== null ) { if ((this.edit || this.isAdd) && this.warehousing.warehouseInProdAttrIds !== null) {
this.form.warehouseInProdAttrIds = this.warehousing.warehouseInProdAttrIds?.split(',').map(e => +e) || [] this.form.warehouseInProdAttrIds = this.warehousing.warehouseInProdAttrIds?.split(",").map((e) => +e) || []
} else { } else {
this.form.warehouseInProdAttrIds = this.form.warehouseInProdAttrIds = this.warehousing.warehouseInProdAttrIds?.split(",").map((e) => +e) || this.warehousing.prodAttrIds?.split(",").map((e) => +e) || []
this.warehousing.warehouseInProdAttrIds?.split(',').map(e => +e)
|| this.warehousing.prodAttrIds?.split(',').map(e => +e)
|| []
} }
this.form.prodId = this.warehousing.prodId this.form.prodId = this.warehousing.prodId
this.form.prodTitleEn = this.warehousing.prodTitleEn this.form.prodTitleEn = this.warehousing.prodTitleEn
...@@ -790,14 +723,14 @@ export default { ...@@ -790,14 +723,14 @@ export default {
this.form.type = this.warehousing.type this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType this.form.feeType = this.warehousing.feeType
this.form.pictureUrls = this.warehousing.pictureUrls this.form.pictureUrls = this.warehousing.pictureUrls
this.form.usageIds = this.warehousing.usageIds?this.warehousing.usageIds.split(',') : [] this.form.usageIds = this.warehousing.usageIds ? this.warehousing.usageIds.split(",") : []
if (this.form.usageIds.length > 0 && this.form.usageIds[0] === ''){ if (this.form.usageIds.length > 0 && this.form.usageIds[0] === "") {
this.usageIds.splice(0, 1) this.usageIds.splice(0, 1)
} }
this.warehousing.orderWarehouseInBackItemDoList.forEach(e => { this.warehousing.orderWarehouseInBackItemDoList.forEach((e) => {
let bg = {} let bg = {}
if (e.boxGauge) { if (e.boxGauge) {
const boxGauge = e.boxGauge.split('*') const boxGauge = e.boxGauge.split("*")
// e.boxGauge1 = boxGauge[0] // e.boxGauge1 = boxGauge[0]
// e.boxGauge2 = boxGauge[1] // e.boxGauge2 = boxGauge[1]
// e.boxGauge3 = boxGauge[2] // e.boxGauge3 = boxGauge[2]
...@@ -807,13 +740,13 @@ export default { ...@@ -807,13 +740,13 @@ export default {
boxGauge3: boxGauge[2] boxGauge3: boxGauge[2]
} }
} }
this.form.table.push({...e, ...bg}) this.form.table.push({ ...e, ...bg })
}) })
if (!this.edit){ if (!this.edit) {
let protectRowCount = 0 let protectRowCount = 0
this.protectRowCount = this.form.table.map(e => { this.protectRowCount = this.form.table.map((e) => {
if (e.id){ if (e.id) {
protectRowCount++ protectRowCount++
} }
}) })
...@@ -826,12 +759,12 @@ export default { ...@@ -826,12 +759,12 @@ export default {
warehousePictureList({ warehousePictureList({
bizId: this.orderId, bizId: this.orderId,
type: 1 type: 1
}).then(r =>{ }).then((r) => {
console.log(r, url) console.log(r, url)
if (r.data?.length > 0) { if (r.data?.length > 0) {
const id = r.data.find(e => e?.url === url)?.id const id = r.data.find((e) => e?.url === url)?.id
if (id) { if (id) {
warehousePictureDelete(id).then(r => { warehousePictureDelete(id).then((r) => {
console.log(r) console.log(r)
}) })
} }
...@@ -841,31 +774,31 @@ export default { ...@@ -841,31 +774,31 @@ export default {
handleClose() { handleClose() {
this.visible = false this.visible = false
}, },
handleVolume(index, val){ handleVolume(index, val) {
setTimeout(() => { setTimeout(() => {
const {boxGauge1, boxGauge2, boxGauge3, specificationType, cartonsNum} = (val === 1 ? this.form1.table : this.form.table)[index] const { boxGauge1, boxGauge2, boxGauge3, specificationType, cartonsNum } = (val === 1 ? this.form1.table : this.form.table)[index]
let result = '' let result = ""
if (boxGauge1 && boxGauge2 && boxGauge3 && specificationType && cartonsNum) { if (boxGauge1 && boxGauge2 && boxGauge3 && specificationType && cartonsNum) {
result = (((specificationType === 1 || specificationType === '1') ? cartonsNum : 1) * (boxGauge1 * boxGauge2 * boxGauge3) / 1000000 + 0.000001)?.toFixed(2) || '' result = (((specificationType === 1 || specificationType === "1" ? cartonsNum : 1) * (boxGauge1 * boxGauge2 * boxGauge3)) / 1000000 + 0.000001)?.toFixed(2) || ""
} else { } else {
result = '' result = ""
} }
if (result === '0.00') result = '0.01'; if (result === "0.00") result = "0.01"
(val === 1 ? this.form1.table : this.form.table)[index].volume = result ;(val === 1 ? this.form1.table : this.form.table)[index].volume = result
}, 0) }, 0)
}, },
handleSubmit() { handleSubmit() {
if (this.activeName !== "first"){ if (this.activeName !== "first") {
// 添加非填单货物 // 添加非填单货物
if (this.form1.warehouseInProdAttrIds.indexOf(4) !== -1) { if (this.form1.warehouseInProdAttrIds.indexOf(4) !== -1) {
return this.$notify({ return this.$notify({
title: this.$t('提示'), title: this.$t("提示"),
message: this.$t("订单包含不接受货物,请检查"), message: this.$t("订单包含不接受货物,请检查"),
type: 'warning' type: "warning"
}) })
} }
this.$refs['form1'].validate(valid => { this.$refs["form1"].validate((valid) => {
this.$refs['tableForm1'].validate(valid1 => { this.$refs["tableForm1"].validate((valid1) => {
if (!valid || !valid1) { if (!valid || !valid1) {
return return
} }
...@@ -876,38 +809,40 @@ export default { ...@@ -876,38 +809,40 @@ export default {
orderId: this.warehousing.orderId, orderId: this.warehousing.orderId,
orderItemId: undefined, orderItemId: undefined,
orderNo: this.warehousing.orderNo, orderNo: this.warehousing.orderNo,
warehouseInProdAttrIds: this.form1.warehouseInProdAttrIds.join(','), warehouseInProdAttrIds: this.form1.warehouseInProdAttrIds.join(","),
usageIds: this.form1.usageIds.join(','), usageIds: this.form1.usageIds.join(","),
orderWarehouseInItemDoList: this.form1.table.map(e => { orderWarehouseInItemDoList: this.form1.table.map((e) => {
return { return {
...e, ...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3, boxGauge: e.boxGauge1 + "*" + e.boxGauge2 + "*" + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList orderLocationCreateReqVOList: e.orderLocationBackVOList
} }
}) })
}).then(r => {
this.submitting = false
if (r.data) {
this.$message.success('新增入仓成功')
this.handleClose()
} else {
this.$message.success('新增入仓失败')
}
}).catch(() => {
this.submitting = false
}) })
.then((r) => {
this.submitting = false
if (r.data) {
this.$message.success("新增入仓成功")
this.handleClose()
} else {
this.$message.success("新增入仓失败")
}
})
.catch(() => {
this.submitting = false
})
}) })
}) })
} else { } else {
if (this.form.warehouseInProdAttrIds.indexOf(4) !== -1) { if (this.form.warehouseInProdAttrIds.indexOf(4) !== -1) {
return this.$notify({ return this.$notify({
title: this.$t('提示'), title: this.$t("提示"),
message: this.$t("订单包含不接受货物,请检查"), message: this.$t("订单包含不接受货物,请检查"),
type: 'warning' type: "warning"
}) })
} }
this.$refs['form'].validate(valid => { this.$refs["form"].validate((valid) => {
this.$refs['tableForm'].validate(valid1 => { this.$refs["tableForm"].validate((valid1) => {
if (!valid || !valid1) { if (!valid || !valid1) {
return return
} }
...@@ -921,30 +856,32 @@ export default { ...@@ -921,30 +856,32 @@ export default {
orderItemId: this.warehousing.orderItemId, orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo, orderNo: this.warehousing.orderNo,
num: this.warehousing.num, num: this.warehousing.num,
volume: (+this.warehousing.volume)?.toFixed(2) || '', volume: (+this.warehousing.volume)?.toFixed(2) || "",
weight: (+this.warehousing.weight)?.toFixed(2) || '', weight: (+this.warehousing.weight)?.toFixed(2) || "",
prodId: this.form.prodId, prodId: this.form.prodId,
warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','), warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(","),
usageIds: this.form.usageIds.join(','), usageIds: this.form.usageIds.join(","),
"orderWarehouseInUpdateItemDoList": this.form.table.map(e => { orderWarehouseInUpdateItemDoList: this.form.table.map((e) => {
return { return {
...e, ...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3, boxGauge: e.boxGauge1 + "*" + e.boxGauge2 + "*" + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList orderLocationCreateReqVOList: e.orderLocationBackVOList
} }
}), }),
copyUserId: this.selectedUsers copyUserId: this.selectedUsers
}).then(r => {
this.submitting = false
if (r.data) {
this.$message.success(r.msg || '入仓修改发起成功')
this.handleClose()
} else {
this.$message.success(r.msg || '入仓修改发起失败')
}
}).catch(() => {
this.submitting = false
}) })
.then((r) => {
this.submitting = false
if (r.data) {
this.$message.success(r.msg || "入仓修改发起成功")
this.handleClose()
} else {
this.$message.success(r.msg || "入仓修改发起失败")
}
})
.catch(() => {
this.submitting = false
})
} else { } else {
// 首次入仓、入仓补充 // 首次入仓、入仓补充
this.submitting = true this.submitting = true
...@@ -955,82 +892,84 @@ export default { ...@@ -955,82 +892,84 @@ export default {
orderItemId: this.warehousing.orderItemId, orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo, orderNo: this.warehousing.orderNo,
isAppend: this.isAdd ? true : undefined, isAppend: this.isAdd ? true : undefined,
warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','), warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(","),
usageIds: this.form.usageIds.join(','), usageIds: this.form.usageIds.join(","),
orderWarehouseInItemDoList: this.form.table.map(e => { orderWarehouseInItemDoList: this.form.table.map((e) => {
return { return {
...e, ...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3, boxGauge: e.boxGauge1 + "*" + e.boxGauge2 + "*" + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList orderLocationCreateReqVOList: e.orderLocationBackVOList
} }
}), })
}).then(r => {
this.submitting = false
if (r.data) {
this.$message.success('入仓成功')
this.handleClose()
} else {
this.$message.success('入仓失败')
}
}).catch(() => {
this.submitting = false
}) })
.then((r) => {
this.submitting = false
if (r.data) {
this.$message.success("入仓成功")
this.handleClose()
} else {
this.$message.success("入仓失败")
}
})
.catch(() => {
this.submitting = false
})
} }
}) })
}) })
} }
}, },
handleCancelProcessInstance(){ handleCancelProcessInstance() {
this.$prompt('请输入取消原因?', this.$t("取消流程"), { this.$prompt("请输入取消原因?", this.$t("取消流程"), {
type: 'warning', type: "warning",
confirmButtonText: this.$t("确定"), confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"), cancelButtonText: this.$t("取消"),
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格 inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: this.$t("取消原因不能为空"), inputErrorMessage: this.$t("取消原因不能为空")
}).then(({ value }) => { }).then(({ value }) => {
cancelProcessInstance(this.formId, value).then(() => { cancelProcessInstance(this.formId, value).then(() => {
this.opened = false this.opened = false
this.$modal.msgSuccess("取消成功"); this.$modal.msgSuccess("取消成功")
}) })
}) })
}, },
onProductChange(product){ onProductChange(product) {
if (!product) { if (!product) {
return return
} }
this.form.prodTitleZh = product.titleZh this.form.prodTitleZh = product.titleZh
this.form.prodTitleEn = product.titleEn this.form.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form.brand)) this.handleBrandChange(parseInt(this.form.brand))
this.form.warehouseInProdAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : [] this.form.warehouseInProdAttrIds = product.attrId ? product.attrId.split(",").map((e) => +e) : []
}, },
onProductChange1(product){ onProductChange1(product) {
if (!product) { if (!product) {
return return
} }
this.form1.prodTitleZh = product.titleZh this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn this.form1.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form1.brand)) this.handleBrandChange(parseInt(this.form1.brand))
this.form1.warehouseInProdAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : [] this.form1.warehouseInProdAttrIds = product.attrId ? product.attrId.split(",").map((e) => +e) : []
}, },
getProductBrandPage(titleZh = undefined) { getProductBrandPage(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => { getProductBrankPage({ pageSize: 20, titleZh }).then((r) => {
this.brandList = r.data.list this.brandList = r.data.list
}) })
}, },
getProductBrandPage1(titleZh = undefined) { getProductBrandPage1(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => { getProductBrankPage({ pageSize: 20, titleZh }).then((r) => {
this.brandList1 = r.data.list this.brandList1 = r.data.list
}) })
}, },
handleBrandChange(v){ handleBrandChange(v) {
getFeeTypeByOrderProduct({ getFeeTypeByOrderProduct({
brandId: parseInt(v), brandId: parseInt(v),
productId: this.warehousing.prodId, productId: this.warehousing.prodId,
orderId: this.orderId orderId: this.orderId
}).then(r => { }).then((r) => {
if(r.code === 0){ if (r.code === 0) {
(this.activeName === "first" ? this.form : this.form1).feeType = parseInt(r.data.feeType); ;(this.activeName === "first" ? this.form : this.form1).feeType = parseInt(r.data.feeType)
(this.activeName === "first" ? this.form : this.form1).recordMode = parseInt(r.data.recordMode) ;(this.activeName === "first" ? this.form : this.form1).recordMode = parseInt(r.data.recordMode)
} }
}) })
}, },
...@@ -1043,16 +982,17 @@ export default { ...@@ -1043,16 +982,17 @@ export default {
}, },
handleDeleteRow(index, val) { handleDeleteRow(index, val) {
if (val === 1) { if (val === 1) {
this.form1.table.splice(index, 1); this.form1.table.splice(index, 1)
} else if (this.form.table.length > this.protectRowCount) { } else if (this.form.table.length > this.protectRowCount) {
this.form.table.splice(index, 1); this.form.table.splice(index, 1)
} }
}, },
handleAdd(val = 0) { handleAdd(val = 0) {
let cartonsNum = '' let cartonsNum = ""
if (val !== 1) { // 货物入仓 if (val !== 1) {
// 货物入仓
let hasCartonsNum = 0 let hasCartonsNum = 0
this.form.table.forEach(e => { this.form.table.forEach((e) => {
hasCartonsNum += e.cartonsNum hasCartonsNum += e.cartonsNum
}) })
cartonsNum = this.warehousing.num - hasCartonsNum cartonsNum = this.warehousing.num - hasCartonsNum
...@@ -1066,43 +1006,43 @@ export default { ...@@ -1066,43 +1006,43 @@ export default {
orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList)) orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList))
}*/ }*/
form.table.push({ form.table.push({
"boxGauge1": this.isJiyun ? 0 : '', boxGauge1: this.isJiyun ? 0 : "",
"boxGauge2": this.isJiyun ? 0 : '', boxGauge2: this.isJiyun ? 0 : "",
"boxGauge3": this.isJiyun ? 0 : '', boxGauge3: this.isJiyun ? 0 : "",
"cartonsNum": cartonsNum > 0 ? cartonsNum : '', cartonsNum: cartonsNum > 0 ? cartonsNum : "",
"expressNo": "", expressNo: "",
"quantityAll": undefined, quantityAll: undefined,
"unit": "1", unit: "1",
"volume": '', volume: "",
"weight": '', weight: "",
specificationType: '1', specificationType: "1",
table: [], table: [],
orderLocationBackVOList orderLocationBackVOList
}) })
}, },
/** 获取产品属性列表 */ /** 获取产品属性列表 */
getAttrList() { getAttrList() {
getProductAttrList().then(response => { getProductAttrList().then((response) => {
this.attrList = response.data; this.attrList = response.data
}) })
}, },
/** 获取产品类型列表 */ /** 获取产品类型列表 */
getTypeList() { getTypeList() {
getProductTypeList().then(response => { getProductTypeList().then((response) => {
this.typeList = response.data; this.typeList = response.data
}) })
}, },
productSubmit(){ productSubmit() {
this.$refs["productForm"].validate(valid => { this.$refs["productForm"].validate((valid) => {
if (!valid) { if (!valid) {
return; return
} }
//商品特性转字符串 //商品特性转字符串
this.productForm.attrId = this.productForm.attrArray.join(',') this.productForm.attrId = this.productForm.attrArray.join(",")
// 添加的提交 // 添加的提交
addProduct(this.productForm).then(response => { addProduct(this.productForm).then((response) => {
this.$modal.msgSuccess(this.$t("新增成功")) this.$modal.msgSuccess(this.$t("新增成功"))
if (this.activeName === 'first') { if (this.activeName === "first") {
this.form.prodId = response.data this.form.prodId = response.data
this.form.warehouseInProdAttrIds = this.productForm.attrArray this.form.warehouseInProdAttrIds = this.productForm.attrArray
} else { } else {
...@@ -1113,7 +1053,7 @@ export default { ...@@ -1113,7 +1053,7 @@ export default {
}) })
}) })
}, },
productCancel(){ productCancel() {
this.isShowProduct = false this.isShowProduct = false
this.productForm = { this.productForm = {
typeId: undefined, typeId: undefined,
...@@ -1126,6 +1066,4 @@ export default { ...@@ -1126,6 +1066,4 @@ export default {
} }
</script> </script>
<style scoped> <style scoped></style>
</style>
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<product-selector v-if="(!order.parentOrderId && !isAdd) || order.splitSeparateOrder" v-model="form.prodId" @change="onProductChange" determined protect-once /> <product-selector v-if="(!order.parentOrderId && !isAdd) || order.splitSeparateOrder" v-model="form.prodId" @change="onProductChange" determined protect-once />
<span v-else>{{ warehousing.prodTitleZh }}</span> <span v-else>{{ warehousing.prodTitleZh }}</span>
</span> </span>
<el-button type="text" @click="isShowProduct = true">添加新商品</el-button>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t("英文品名") }}</template> <template slot="label"><span style="color: red">*</span>{{ $t("英文品名") }}</template>
...@@ -198,18 +199,38 @@ ...@@ -198,18 +199,38 @@
</div> </div>
<span slot="footer"> <span slot="footer">
<template v-if="!isEditing"> <el-button @click="handleClose">{{ $t("关 闭") }}</el-button>
<el-button @click="handleClose">{{ $t("关 闭") }}</el-button> <el-button type="primary" :loading="submitting" @click="handleSubmit()">{{ $t("确认修改") }}</el-button>
<el-button type="primary" :loading="submitting" @click="handleSubmit()">{{ edit ? $t("确认修改") : $t("提 交") }}</el-button>
</template>
<template v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + formId)">{{ $t("审核中") }}</el-button>
<el-button type="primary" @click="handleCancelProcessInstance">{{ $t("取消审核") }}</el-button>
<el-button @click="handleClose">{{ $t("返回") }}</el-button>
</template>
<template v-else> </template>
</span> </span>
</el-dialog> </el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="添加商品" :visible.sync="isShowProduct" width="550px" append-to-body>
<el-form ref="productForm" :model="productForm" :rules="productRules" label-width="110px">
<el-form-item :label="$t('商品类型')" prop="typeId">
<el-select v-model="productForm.typeId" :placeholder="$t('选择商品类型')" clearable>
<el-option v-for="types in typeList" :key="types.id" :label="types.titleZh" :value="types.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('中文标题')" prop="titleZh">
<el-input v-model="productForm.titleZh" :placeholder="$t('请输入中文标题')" />
</el-form-item>
<el-form-item :label="$t('英文标题')" prop="titleEn">
<el-input v-model="productForm.titleEn" :placeholder="$t('请输入英文标题')" />
</el-form-item>
<el-form-item :label="$t('商品特性')" prop="attrArray">
<el-select v-model="productForm.attrArray" :placeholder="$t('选择商品特性')" clearable multiple>
<el-option v-for="attr in attrList" :key="attr.id" :label="attr.attrName" :value="attr.id" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="productSubmit">{{ $t("确定") }}</el-button>
<el-button @click="productCancel">{{ $t("取消") }}</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
...@@ -220,7 +241,7 @@ import { getFeeTypeByOrderProduct, getProductBrankPage } from "@/api/ecw/product ...@@ -220,7 +241,7 @@ import { getFeeTypeByOrderProduct, getProductBrankPage } from "@/api/ecw/product
import { cancelProcessInstance } from "@/api/bpm/processInstance" import { cancelProcessInstance } from "@/api/bpm/processInstance"
import WorkFlow from "@/components/WorkFlow" import WorkFlow from "@/components/WorkFlow"
import { DICT_TYPE, getDictDataLabel, getDictDatas } from "@/utils/dict" import { DICT_TYPE, getDictDataLabel, getDictDatas } from "@/utils/dict"
import { orderWarehouseIn, orderWarehouseInUpdateApply, warehousePictureDelete, warehousePictureList } from "@/api/ecw/order" import { orderWarehouseIn, orderWarehouseInUpdateApply, warehousePictureDelete, warehousePictureList, order_warehouse_check_update } from "@/api/ecw/order"
import { getProductAttrList } from "@/api/ecw/productAttr" import { getProductAttrList } from "@/api/ecw/productAttr"
import { getProductTypeList } from "@/api/ecw/productType" import { getProductTypeList } from "@/api/ecw/productType"
import { addProduct } from "@/api/ecw/product" import { addProduct } from "@/api/ecw/product"
...@@ -386,26 +407,6 @@ export default { ...@@ -386,26 +407,6 @@ export default {
pictureUrls: [], pictureUrls: [],
usageIds: [] usageIds: []
}, },
form1: {
table: [],
brandType: undefined,
orderId: undefined,
orderNo: undefined,
brand: undefined,
inTime: undefined,
material: undefined,
orderItemId: undefined,
warehouseCheckProdAttrIds: [],
prodId: undefined,
prodTitleEn: undefined,
prodTitleZh: undefined,
prodType: undefined,
type: 1,
feeType: undefined,
recordMode: undefined,
pictureUrls: [],
usageIds: []
},
brandList: [], brandList: [],
brandList1: [], brandList1: [],
formRules: { formRules: {
...@@ -432,6 +433,9 @@ export default { ...@@ -432,6 +433,9 @@ export default {
// 追加时被保护的行数 // 追加时被保护的行数
protectRowCount: -1, protectRowCount: -1,
// 添加商品弹窗
isShowProduct: false,
productForm: { productForm: {
typeId: undefined, typeId: undefined,
attrArray: [], attrArray: [],
...@@ -504,8 +508,6 @@ export default { ...@@ -504,8 +508,6 @@ export default {
} }
}) })
this.protectRowCount = protectRowCount this.protectRowCount = protectRowCount
this.handleAdd()
this.handleAdd(1)
} }
}, },
handleImageDelete(url) { handleImageDelete(url) {
...@@ -541,136 +543,57 @@ export default { ...@@ -541,136 +543,57 @@ export default {
}, 0) }, 0)
}, },
handleSubmit() { handleSubmit() {
if (this.activeName !== "first") { if (this.form.warehouseCheckProdAttrIds.indexOf(4) !== -1) {
// 添加非填单货物 return this.$notify({
if (this.form1.warehouseCheckProdAttrIds.indexOf(4) !== -1) { title: this.$t("提示"),
return this.$notify({ message: this.$t("订单包含不接受货物,请检查"),
title: this.$t("提示"), type: "warning"
message: this.$t("订单包含不接受货物,请检查"), })
type: "warning" }
}) this.$refs["form"].validate((valid) => {
} this.$refs["tableForm"].validate((valid1) => {
this.$refs["form1"].validate((valid) => { if (!valid || !valid1) {
this.$refs["tableForm1"].validate((valid1) => { return
if (!valid || !valid1) { }
return if (this.edit) {
} // 到仓修改
this.submitting = true this.submitting = true
return orderWarehouseIn({ return order_warehouse_check_update({
...this.form1, ...this.form,
brandType: this.warehousing.brandType, brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId, orderId: this.warehousing.orderId,
orderItemId: undefined, orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo, orderNo: this.warehousing.orderNo,
warehouseCheckProdAttrIds: this.form1.warehouseCheckProdAttrIds.join(","), num: this.warehousing.num,
usageIds: this.form1.usageIds.join(","), volume: (+this.warehousing.volume)?.toFixed(2) || "",
orderWarehouseInItemDoList: this.form1.table.map((e) => { weight: (+this.warehousing.weight)?.toFixed(2) || "",
prodId: this.form.prodId,
warehouseCheckProdAttrIds: this.form.warehouseCheckProdAttrIds.join(","),
usageIds: this.form.usageIds.join(","),
orderWarehouseInUpdateItemDoList: this.form.table.map((e) => {
return { return {
...e, ...e,
boxGauge: e.boxGauge1 + "*" + e.boxGauge2 + "*" + e.boxGauge3, boxGauge: e.boxGauge1 + "*" + e.boxGauge2 + "*" + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList orderLocationCreateReqVOList: e.orderLocationBackVOList
} }
}) }),
copyUserId: this.selectedUsers
}) })
.then((r) => { .then((r) => {
this.submitting = false this.submitting = false
if (r.data) { if (r.data) {
this.$message.success("新增入仓成功") this.$message.success(r.msg || "到仓修改发起成功")
this.handleClose() this.handleClose()
} else { } else {
this.$message.success("新增入仓失败") this.$message.success(r.msg || "到仓修改发起失败")
} }
}) })
.catch(() => { .catch(() => {
this.submitting = false this.submitting = false
}) })
}) }
})
} else {
if (this.form.warehouseCheckProdAttrIds.indexOf(4) !== -1) {
return this.$notify({
title: this.$t("提示"),
message: this.$t("订单包含不接受货物,请检查"),
type: "warning"
})
}
this.$refs["form"].validate((valid) => {
this.$refs["tableForm"].validate((valid1) => {
if (!valid || !valid1) {
return
}
if (this.edit) {
// 入仓修改
this.submitting = true
return orderWarehouseInUpdateApply({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
num: this.warehousing.num,
volume: (+this.warehousing.volume)?.toFixed(2) || "",
weight: (+this.warehousing.weight)?.toFixed(2) || "",
prodId: this.form.prodId,
warehouseCheckProdAttrIds: this.form.warehouseCheckProdAttrIds.join(","),
usageIds: this.form.usageIds.join(","),
orderWarehouseInUpdateItemDoList: this.form.table.map((e) => {
return {
...e,
boxGauge: e.boxGauge1 + "*" + e.boxGauge2 + "*" + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
}),
copyUserId: this.selectedUsers
})
.then((r) => {
this.submitting = false
if (r.data) {
this.$message.success(r.msg || "入仓修改发起成功")
this.handleClose()
} else {
this.$message.success(r.msg || "入仓修改发起失败")
}
})
.catch(() => {
this.submitting = false
})
} else {
// 首次入仓、入仓补充
this.submitting = true
return orderWarehouseIn({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
isAppend: this.isAdd ? true : undefined,
warehouseCheckProdAttrIds: this.form.warehouseCheckProdAttrIds.join(","),
usageIds: this.form.usageIds.join(","),
orderWarehouseInItemDoList: this.form.table.map((e) => {
return {
...e,
boxGauge: e.boxGauge1 + "*" + e.boxGauge2 + "*" + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
})
})
.then((r) => {
this.submitting = false
if (r.data) {
this.$message.success("入仓成功")
this.handleClose()
} else {
this.$message.success("入仓失败")
}
})
.catch(() => {
this.submitting = false
})
}
})
}) })
} })
}, },
handleCancelProcessInstance() { handleCancelProcessInstance() {
this.$prompt("请输入取消原因?", this.$t("取消流程"), { this.$prompt("请输入取消原因?", this.$t("取消流程"), {
...@@ -695,15 +618,7 @@ export default { ...@@ -695,15 +618,7 @@ export default {
this.handleBrandChange(parseInt(this.form.brand)) this.handleBrandChange(parseInt(this.form.brand))
this.form.warehouseCheckProdAttrIds = product.attrId ? product.attrId.split(",").map((e) => +e) : [] this.form.warehouseCheckProdAttrIds = product.attrId ? product.attrId.split(",").map((e) => +e) : []
}, },
onProductChange1(product) {
if (!product) {
return
}
this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form1.brand))
this.form1.warehouseCheckProdAttrIds = product.attrId ? product.attrId.split(",").map((e) => +e) : []
},
getProductBrandPage(titleZh = undefined) { getProductBrandPage(titleZh = undefined) {
getProductBrankPage({ pageSize: 20, titleZh }).then((r) => { getProductBrankPage({ pageSize: 20, titleZh }).then((r) => {
this.brandList = r.data.list this.brandList = r.data.list
...@@ -726,53 +641,6 @@ export default { ...@@ -726,53 +641,6 @@ export default {
} }
}) })
}, },
handleDelete(val) {
if (val === 1) {
this.form1.table.pop()
} else if (this.form.table.length > this.protectRowCount) {
this.form.table.pop()
}
},
handleDeleteRow(index, val) {
if (val === 1) {
this.form1.table.splice(index, 1)
} else if (this.form.table.length > this.protectRowCount) {
this.form.table.splice(index, 1)
}
},
handleAdd(val = 0) {
let cartonsNum = ""
if (val !== 1) {
// 货物入仓
let hasCartonsNum = 0
this.form.table.forEach((e) => {
hasCartonsNum += e.cartonsNum
})
cartonsNum = this.warehousing.num - hasCartonsNum
}
const form = val === 1 ? this.form1 : this.form
const formLength = form.table.length
let orderLocationBackVOList = []
/* // 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
if (formLength > 0) {
orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList))
}*/
form.table.push({
boxGauge1: this.isJiyun ? 0 : "",
boxGauge2: this.isJiyun ? 0 : "",
boxGauge3: this.isJiyun ? 0 : "",
cartonsNum: cartonsNum > 0 ? cartonsNum : "",
expressNo: "",
quantityAll: undefined,
unit: "1",
volume: "",
weight: "",
specificationType: "1",
table: [],
orderLocationBackVOList
})
},
/** 获取产品属性列表 */ /** 获取产品属性列表 */
getAttrList() { getAttrList() {
getProductAttrList().then((response) => { getProductAttrList().then((response) => {
...@@ -784,6 +652,34 @@ export default { ...@@ -784,6 +652,34 @@ export default {
getProductTypeList().then((response) => { getProductTypeList().then((response) => {
this.typeList = response.data this.typeList = response.data
}) })
},
productSubmit() {
this.$refs["productForm"].validate((valid) => {
if (!valid) {
return
}
//商品特性转字符串
this.productForm.attrId = this.productForm.attrArray.join(",")
// 添加的提交
addProduct(this.productForm).then((response) => {
this.$modal.msgSuccess(this.$t("新增成功"))
this.form.prodId = response.data
this.form.prodTitleEn = this.productForm.titleEn
this.form.prodTitleZh = this.productForm.titleZh
this.form.prodType = this.productForm.typeId
this.form.warehouseCheckProdAttrIds = this.productForm.attrArray
this.productCancel()
})
})
},
productCancel() {
this.isShowProduct = false
this.productForm = {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
}
} }
} }
} }
......
...@@ -101,10 +101,14 @@ ...@@ -101,10 +101,14 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('审核状态')" prop="auditStatus"> <el-form-item :label="$t('审核状态')" prop="auditStatusList">
<el-select v-model="queryParams.auditStatus" :placeholder="$t('选择审核状态')" clearable> <dict-selector
<el-option v-for="auditStatusItem in auditStatusDictDatas" :key="auditStatusItem.id" :label="auditStatusItem.label" :value="auditStatusItem.value" /> multiple
</el-select> clearable
v-model="queryParams.auditStatusList"
:type="DICT_TYPE.AUDIT_STATUS"
></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('包装要求')" prop="packaging"> <el-form-item :label="$t('包装要求')" prop="packaging">
...@@ -752,6 +756,9 @@ export default { ...@@ -752,6 +756,9 @@ export default {
}, },
computed: { computed: {
DICT_TYPE() {
return DICT_TYPE
},
getTypeName() { getTypeName() {
return (typeId) => { return (typeId) => {
for (let index in this.typeList) { for (let index in this.typeList) {
...@@ -1023,6 +1030,7 @@ export default { ...@@ -1023,6 +1030,7 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.titleZhParam.value = ""; this.titleZhParam.value = "";
this.queryParams.materialTypes =[]; this.queryParams.materialTypes =[];
this.queryParams.auditStatusList =[];
this.handleQuery(); this.handleQuery();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-form-item :label="$t('商品名称')" prop="titleZh"> <el-form-item :label="$t('商品名称')" prop="titleZh">
<el-input v-model="queryParams.titleZh" :placeholder="$t('请输入商品名称')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" /> <el-input v-model="queryParams.titleZh" :placeholder="$t('请输入商品名称')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/\s+/g, '')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('商品类型')" prop="typeId"> <el-form-item :label="$t('商品类型')" prop="typeId">
<el-select v-model="queryParams.typeId" :placeholder="$t('选择商品类型')" clearable> <el-select v-model="queryParams.typeId" :placeholder="$t('选择商品类型')" clearable>
<el-option v-for="type in typeList" :key="type.id" :label="type.titleZh" :value="type.id"/> <el-option v-for="type in typeList" :key="type.id" :label="type.titleZh" :value="type.id"/>
...@@ -26,31 +26,78 @@ ...@@ -26,31 +26,78 @@
<el-option v-for="attr in attrList" :key="attr.id" :label="attr.attrName" :value="attr.id"/> <el-option v-for="attr in attrList" :key="attr.id" :label="attr.attrName" :value="attr.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发地')" prop="startCityId"> <el-form-item :label="$t('始发地')" prop="startCityId">
<el-select v-model="queryParams.startCityId" clearable> <el-select v-model="queryParams.startCityId" clearable>
<el-option v-for="city in startCityList" :key="city.id" :label="city.titleZh" :value="city.id" /> <el-option v-for="city in startCityList" :key="city.id" :label="city.titleZh" :value="city.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="destCityId"> <!-- <el-form-item :label="$t('目的地')" prop="destCityId">
<el-select v-model="queryParams.destCityId" clearable> <el-select v-model="queryParams.destCityId" clearable>
<el-option v-for="city in destCityList" :key="city.id" :label="city.titleZh" :value="city.id" /> <el-option v-for="city in destCityList" :key="city.id" :label="city.titleZh" :value="city.id" />
</el-select>
</el-form-item> -->
<el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select
v-model="destCountryId"
multiple
:label="destCountryId"
clearable
@change="handleQuery"
>
<el-option
v-for="item in countryList"
:key="item.id"
:label="$l(item, 'title')"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="destCityId">
<el-select v-model="destCityId"
multiple
clearable
@change="handleQuery">
<el-option
v-for="item in AddressCity"
:key="item.shi"
:label="item.shiName"
:value="item.shi"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select v-model="destWarehouseId"
clearable
multiple
@change="handleQuery">
<el-option
v-for="item in AddressTown"
:key="item.id"
:label="item.titleZh"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('空运渠道')" prop="shippingChannelId"> <el-form-item :label="$t('空运渠道')" prop="shippingChannelId">
<el-select v-model="queryParams.shippingChannelId" clearable> <el-select v-model="queryParams.shippingChannelId" clearable>
<el-option v-for="item in channelList" :key="item.id" :label="item.nameZh" :value="item.channelId" /> <el-option v-for="item in channelList" :key="item.id" :label="item.nameZh" :value="item.channelId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="" prop="blacklist" v-if="false"> <el-form-item label="" prop="blacklist" v-if="false">
<el-checkbox v-model="queryParams.blacklist" <el-checkbox v-model="queryParams.blacklist"
:true-label="1" :false-label="0">{{$t('黑名单')}}</el-checkbox> :true-label="1" :false-label="0">{{$t('黑名单')}}</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
...@@ -132,10 +179,10 @@ ...@@ -132,10 +179,10 @@
<el-table-column prop="price" :label="$t('价格')" align="center"> <el-table-column prop="price" :label="$t('价格')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
{{$t('海运费')}}:{{ getCurrencySymbol(scope.row.transportPriceUnit) + scope.row.transportPrice}}&nbsp; {{$t('海运费')}}:{{ getCurrencySymbol(scope.row.transportPriceUnit) + scope.row.transportPrice}}&nbsp;
{{ getCurrencyTitle(scope.row.transportPriceUnit) + '/' + getUnitTitle(scope.row.transportVolumeUnit)}} {{ getCurrencyTitle(scope.row.transportPriceUnit) + '/' + getUnitTitle(scope.row.transportVolumeUnit)}}
<br /> <br />
{{$t('清关费')}}:{{ getCurrencySymbol(scope.row.clearancePriceUnit) + scope.row.clearancePrice}}&nbsp; {{$t('清关费')}}:{{ getCurrencySymbol(scope.row.clearancePriceUnit) + scope.row.clearancePrice}}&nbsp;
{{ getCurrencyTitle(scope.row.clearancePriceUnit) + '/' + getUnitTitle(scope.row.clearanceVolumeUnit)}} {{ getCurrencyTitle(scope.row.clearancePriceUnit) + '/' + getUnitTitle(scope.row.clearanceVolumeUnit)}}
</div> </div>
</template> </template>
...@@ -184,7 +231,7 @@ ...@@ -184,7 +231,7 @@
<el-option v-for="type in typeList" :key="type.id" :label="type.titleZh" :value="type.id"/> <el-option v-for="type in typeList" :key="type.id" :label="type.titleZh" :value="type.id"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('商品名称')" prop="titleZh"> <el-form-item :label="$t('商品名称')" prop="titleZh">
<el-input v-model="form.titleZh" disabled /> <el-input v-model="form.titleZh" disabled />
...@@ -198,26 +245,26 @@ ...@@ -198,26 +245,26 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('运输方式')" prop="transportType"> <el-form-item :label="$t('运输方式')" prop="transportType">
<el-select v-model="form.transportType" clearable @change="transportTypeChange"> <el-select v-model="form.transportType" clearable @change="transportTypeChange">
<el-option v-for="dict in transportDatas" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value" /> <el-option v-for="dict in transportDatas" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('始发地')" prop="startCityId"> <el-form-item :label="$t('始发地')" prop="startCityId">
<el-select v-model="form.startCityId" clearable @change="startCityChange"> <el-select v-model="form.startCityId" clearable @change="startCityChange">
<el-option v-for="city in startCityList" :key="city.id" :label="$l(city, 'title')" :value="city.id" /> <el-option v-for="city in startCityList" :key="city.id" :label="$l(city, 'title')" :value="city.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('目的地')" prop="destCityId"> <el-form-item :label="$t('目的地')" prop="destCityId">
<el-select v-model="form.destCityId" clearable @change="destCityChange"> <el-select v-model="form.destCityId" clearable @change="destCityChange">
<el-option v-for="city in destCityList" :key="city.id" :label="$l(city, 'title')" :value="city.id" /> <el-option v-for="city in destCityList" :key="city.id" :label="$l(city, 'title')" :value="city.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
...@@ -243,7 +290,7 @@ ...@@ -243,7 +290,7 @@
})}} })}}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<br /> <br />
...@@ -252,7 +299,7 @@ ...@@ -252,7 +299,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<el-select v-model="form.transportPriceUnit"> <el-select v-model="form.transportPriceUnit">
<el-option v-for="currency in currecyList" :key="currency.id" :label="$l(currency, 'title')" :value="currency.id" /> <el-option v-for="currency in currecyList" :key="currency.id" :label="$l(currency, 'title')" :value="currency.id" />
</el-select> </el-select>
</el-col> </el-col>
...@@ -262,7 +309,7 @@ ...@@ -262,7 +309,7 @@
<el-col :span="4"> <el-col :span="4">
<el-select v-model="form.transportVolumeUnit"> <el-select v-model="form.transportVolumeUnit">
<el-option v-for="unit in unitList" :key="unit.id" :label="$l(unit, 'title')" :value="unit.id" /> <el-option v-for="unit in unitList" :key="unit.id" :label="$l(unit, 'title')" :value="unit.id" />
</el-select> </el-select>
</el-col> </el-col>
</el-row> </el-row>
...@@ -272,7 +319,7 @@ ...@@ -272,7 +319,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="4"> <el-col :span="4">
<el-select v-model="form.clearancePriceUnit"> <el-select v-model="form.clearancePriceUnit">
<el-option v-for="currency in currecyList" :key="currency.id" :label="$l(currency, 'title')" :value="currency.id" /> <el-option v-for="currency in currecyList" :key="currency.id" :label="$l(currency, 'title')" :value="currency.id" />
</el-select> </el-select>
</el-col> </el-col>
...@@ -282,7 +329,7 @@ ...@@ -282,7 +329,7 @@
<el-col :span="4"> <el-col :span="4">
<el-select v-model="form.clearanceVolumeUnit"> <el-select v-model="form.clearanceVolumeUnit">
<el-option v-for="unit in unitList" :key="unit.id" :label="$l(unit, 'title')" :value="unit.id" /> <el-option v-for="unit in unitList" :key="unit.id" :label="$l(unit, 'title')" :value="unit.id" />
</el-select> </el-select>
</el-col> </el-col>
</el-row> </el-row>
...@@ -334,6 +381,8 @@ ...@@ -334,6 +381,8 @@
</template> </template>
<script> <script>
import { getRegionList } from "@/api/ecw/order";
import { getTradeCityList, getListTree } from "@/api/ecw/region";
import { createProductPrice, updateProductPrice, deleteProductPrice, getProductPrice, getProductPricePage, exportProductPriceExcel } from "@/api/ecw/productPrice"; import { createProductPrice, updateProductPrice, deleteProductPrice, getProductPrice, getProductPricePage, exportProductPriceExcel } from "@/api/ecw/productPrice";
import { openedRouterList } from "@/api/ecw/warehouse"; import { openedRouterList } from "@/api/ecw/warehouse";
import { getCityList } from "@/api/ecw/region"; import { getCityList } from "@/api/ecw/region";
...@@ -344,6 +393,7 @@ import { getCurrencyList } from '@/api/ecw/currency'; ...@@ -344,6 +393,7 @@ import { getCurrencyList } from '@/api/ecw/currency';
import { getUnitList } from '@/api/ecw/unit'; import { getUnitList } from '@/api/ecw/unit';
import { AuditStatusEnum} from '@/utils/constants' import { AuditStatusEnum} from '@/utils/constants'
import { getChannelList } from '@/api/ecw/channel'; import { getChannelList } from '@/api/ecw/channel';
import { getProduct } from "@/api/ecw/product";
import DictTag from '@/components/DictTag' import DictTag from '@/components/DictTag'
import {arrryToKeyedObjectBy} from '@/utils/index' import {arrryToKeyedObjectBy} from '@/utils/index'
export default { export default {
...@@ -353,6 +403,18 @@ export default { ...@@ -353,6 +403,18 @@ export default {
}, },
data() { data() {
return { return {
AddressCity: [], //目的城市
AddressProvince: [], //省份
AddressTown: [], //目的仓
countryList: [], //目的国
warehouseList: [], //目前仓
destCountryId: [],
destCityId: null,
destWarehouseId: "",
objectiveId: [],
//特性列表 //特性列表
attrList:[], attrList:[],
typeList: [], typeList: [],
...@@ -399,6 +461,10 @@ export default { ...@@ -399,6 +461,10 @@ export default {
clearanceVolumeUnit: null, clearanceVolumeUnit: null,
shippingChannelId: null, shippingChannelId: null,
status: null, status: null,
destCityId: null, //目的城市
destCountryId: null, //目的国
destWarehouseId: null, //目的仓
objectiveId: null,
}, },
// 表单参数 // 表单参数
form: { form: {
...@@ -423,10 +489,195 @@ export default { ...@@ -423,10 +489,195 @@ export default {
advanceStatusDictDatas: getDictDatas(DICT_TYPE.ADVANCE_STATUS), advanceStatusDictDatas: getDictDatas(DICT_TYPE.ADVANCE_STATUS),
AuditStatusEnum: AuditStatusEnum, AuditStatusEnum: AuditStatusEnum,
locationList: getDictDatas(DICT_TYPE.ECW_CONTAINER_LOCATION), locationList: getDictDatas(DICT_TYPE.ECW_CONTAINER_LOCATION),
}; };
}, },
watch: {
destCountryId: {
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep: true, //深度监听
handler() {
//每当值省份值改变时其下地区值进行清空
this.AddressCity = [];
this.AddressTown = [];
this.destWarehouseId = "";
this.destCityId = "";
this.findByprovinceCode();
if (this.destCountryId == "") {
//1 是所有区域,2 国家,3是市,
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId != "" &&
this.objectiveId == "" &&
this.destWarehouseId == ""
) {
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
}
},
},
destCityId: {
deep: true, //深度监听 目的仓
handler() {
this.AddressTown = [];
this.destWarehouseId = "";
this.findBycityCode();
if (
this.destCityId != "" &&
this.destCountryId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId == "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId == "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
}
},
},
destWarehouseId: {
deep: true, //深度监听
handler() {
if (
this.destCountryId != "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId != "" &&
this.destCityId == "" &&
this.destWarehouseId == ""
) {
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
} else if (
this.destCountryId == "" &&
this.destCityId != "" &&
this.destWarehouseId == ""
) {
getRegionList(3, this.destCityId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
}
},
},
"$route.query.product_id"() {
// if(!this.$route.query.product_id){
// return this.product = null
// }
// 价格列表 跟 商品的价格列表,有时候商品价格列表的路由变动会导致价格列表也执行此处代码,所以做一个判断排除
// https://zentao.test.jdshangmen.com/bug-view-4928.html
if (this.$route.path != this.entryPath) return;
let productId = this.product?.id;
if (this.$route.name === "ProductPrice") {
if (this.$route.query.product_id != productId) {
this.queryParams = {
pageNo: 1,
pageSize: 10,
productId: this.$route.query.product_id,
typeId: this.$route.query.product_type,
transportType: this.$route.query.transportType,
};
}
getProduct(this.$route.query.product_id).then((res) => {
this.product = res.data;
});
this.getList();
}
},
},
computed: { computed: {
keyedChannel(){ keyedChannel(){
return arrryToKeyedObjectBy(this.channelList, 'channelId') return arrryToKeyedObjectBy(this.channelList, 'channelId')
...@@ -514,8 +765,8 @@ export default { ...@@ -514,8 +765,8 @@ export default {
created() { created() {
this.queryParams.blacklist = 1; this.queryParams.blacklist = 1;
// this.transportDatas = getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE); // this.transportDatas = getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE);
// console.log(this.transportDatas); // console.log(this.transportDatas);
let productJson = localStorage.getItem('product'); let productJson = localStorage.getItem('product');
...@@ -524,11 +775,15 @@ export default { ...@@ -524,11 +775,15 @@ export default {
this.getTypeList(); this.getTypeList();
this.getChannelList() this.getChannelList()
this.getAttrList(); this.getAttrList();
this.getList(); this.getList();
this.getData();
//获取国家列表
this.getCountryList();
//获取城市列表 //获取城市列表
this.getAllCityList(); //this.getAllCityList();
//获取货币列表 //获取货币列表
this.requestCurrencyList(); this.requestCurrencyList();
//获取单位列表 //获取单位列表
...@@ -538,6 +793,28 @@ export default { ...@@ -538,6 +793,28 @@ export default {
methods: { methods: {
findByprovinceCode() {
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList(2, this.destCountryId)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
},
findBycityCode() {
//获取当前城市值id,获取该城市下区域
getRegionList(3, this.objectiveId)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
},
getChannelList(){ getChannelList(){
getChannelList().then(res => this.channelList = res.data) getChannelList().then(res => this.channelList = res.data)
}, },
...@@ -555,6 +832,40 @@ export default { ...@@ -555,6 +832,40 @@ export default {
}) })
}, },
getData() {
//加载时发起请求获取所有省份值
getRegionList(1, 1)
.then(({ data }) => {
this.AddressProvince = data;
})
.catch((error) => {
console.log(error);
});
//目的城市
getRegionList(4, 4)
.then(({ data }) => {
this.AddressCity = data;
})
.catch((error) => {
console.log(error);
});
//目的仓
getRegionList(5, 5)
.then(({ data }) => {
this.AddressTown = data;
})
.catch((error) => {
console.log(error);
});
},
/* 国家 */
getCountryList() {
getListTree({ treeType: 1 }).then((response) => {
this.countryList = response.data;
});
},
/**获取所有城市列表 */ /**获取所有城市列表 */
getAllCityList() { getAllCityList() {
getCityList({}).then(response => { getCityList({}).then(response => {
...@@ -585,7 +896,7 @@ export default { ...@@ -585,7 +896,7 @@ export default {
requestCurrencyList() { requestCurrencyList() {
getCurrencyList().then(response => { getCurrencyList().then(response => {
this.currecyList = response.data; this.currecyList = response.data;
}) })
}, },
/**获取所有单位列表 */ /**获取所有单位列表 */
...@@ -662,6 +973,13 @@ export default { ...@@ -662,6 +973,13 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1;
//目的城市
this.queryParams.destCityId = this.destCityId;
//目的国
this.queryParams.destCountryId = this.destCountryId;
//目的仓
this.queryParams.destWarehouseId = this.destWarehouseId;
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
...@@ -693,11 +1011,11 @@ export default { ...@@ -693,11 +1011,11 @@ export default {
} else { } else {
row.auditStatus = row.auditStatus === AuditStatusEnum.PASS ? AuditStatusEnum.NOT_PASS : AuditStatusEnum.PASS; row.auditStatus = row.auditStatus === AuditStatusEnum.PASS ? AuditStatusEnum.NOT_PASS : AuditStatusEnum.PASS;
} }
}); });
}, },
checkSelectable() { checkSelectable() {
return !this.isUpdate; return !this.isUpdate;
}, },
...@@ -778,4 +1096,4 @@ export default { ...@@ -778,4 +1096,4 @@ export default {
} }
} }
}; };
</script> </script>
\ No newline at end of file
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
> >
<el-select <el-select
v-model="queryParams.attrId" v-model="queryParams.attrId"
:placeholder="$t('选择商品类型')" :placeholder="$t('选择商品属性')"
clearable clearable
@change="handleQuery" @change="handleQuery"
> >
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
<el-form-item :label="$t('目的国')" prop="destCountryId"> <el-form-item :label="$t('目的国')" prop="destCountryId">
<el-select <el-select
v-model="destCountryId" v-model="destCountryId"
multiple
:label="destCountryId" :label="destCountryId"
clearable clearable
@change="handleQuery" @change="handleQuery"
...@@ -147,7 +148,10 @@ ...@@ -147,7 +148,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的地')" prop="destCityId"> <el-form-item :label="$t('目的地')" prop="destCityId">
<el-select v-model="destCityId" clearable @change="handleQuery"> <el-select v-model="destCityId"
multiple
clearable
@change="handleQuery">
<el-option <el-option
v-for="item in AddressCity" v-for="item in AddressCity"
:key="item.shi" :key="item.shi"
...@@ -157,7 +161,10 @@ ...@@ -157,7 +161,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId"> <el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select v-model="destWarehouseId" clearable @change="handleQuery"> <el-select v-model="destWarehouseId"
clearable
multiple
@change="handleQuery">
<el-option <el-option
v-for="item in AddressTown" v-for="item in AddressTown"
:key="item.id" :key="item.id"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment