Commit 262ff4a2 authored by 我在何方's avatar 我在何方
parents 201fdd77 d6ae5a8e
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
} }
}, },
"exclude": [ "exclude": [
"node_modules" "node_modules",
"dist",
"bin",
"public",
"src/i18n/"
] ]
} }
\ No newline at end of file
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
} }
getCustomerContactsSelect({ids: this.value.join(',')}) getCustomerContactsSelect({ids: this.value.join(',')})
.then(res => { .then(res => {
this.$set(this, 'choosedList', res.data) this.$set(this, 'choosedList', res.data.list)
}) })
}, },
reLoad(){ reLoad(){
......
...@@ -40,20 +40,19 @@ export default { ...@@ -40,20 +40,19 @@ export default {
} }
}, },
watch:{ watch:{
index(val){ index(val, oldVal){
let productId = val !== '' && val !== null ? this.list[val].id : null let productId = val !== '' && val !== null ? this.list[val].id : null
console.log('index val', val, productId) // console.log('index val', val, oldVal, productId)
this.$emit('input', productId) this.$emit('input', productId)
this.$emit('change', val !== '' && val !== null ? this.list[val] : null) this.$emit('change', val !== '' && val !== null ? this.list[val] : null)
// 0 != '' 是 false
}, },
value(val){ value(val){
console.log('初始化内容', val) // console.log('初始化内容', val)
this.init() this.init()
} }
}, },
created(){ created(){
console.log('created', this.value) // console.log('created', this.value, this.lang)
this.init() this.init()
}, },
methods:{ methods:{
......
...@@ -53,7 +53,8 @@ export default { ...@@ -53,7 +53,8 @@ export default {
return [] return []
} }
}, },
showAll: Boolean showAll: Boolean,
isall: Boolean
}, },
data() { data() {
return { return {
...@@ -97,6 +98,9 @@ export default { ...@@ -97,6 +98,9 @@ export default {
}, },
defaultIds(){ defaultIds(){
this.loadDefaultProds() this.loadDefaultProds()
},
isall(isall){
this.isAllProduct = isall
} }
}, },
created() { created() {
...@@ -104,7 +108,7 @@ export default { ...@@ -104,7 +108,7 @@ export default {
getProductAttrList().then(res => this.attrList = res.data) getProductAttrList().then(res => this.attrList = res.data)
this.reLoad() this.reLoad()
this.ids = this.defaultIds //数据回显 this.ids = this.defaultIds //数据回显
this.isAllProduct = this.isall
// 如果有默认商品则获取内容供回显 // 如果有默认商品则获取内容供回显
if(this.defaultIds.length){ if(this.defaultIds.length){
this.loadDefaultProds() this.loadDefaultProds()
......
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
setInterval(() => { setInterval(() => {
this.$store.dispatch('getNotMessage'); this.$store.dispatch('getNotMessage');
this.$store.dispatch('getToDoList'); this.$store.dispatch('getToDoList');
}, 3000) }, 10000)
}, },
components: { components: {
Breadcrumb, Breadcrumb,
......
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
v-if="form.type != 1" v-if="form.type != 1"
> >
<!-- <dict-selector :type="DICT_TYPE.ECW_SUITABLE_PROD_TYPE" v-model="form.suitableProdType" /> --> <!-- <dict-selector :type="DICT_TYPE.ECW_SUITABLE_PROD_TYPE" v-model="form.suitableProdType" /> -->
<products-selector v-model="form.prodIds" :default-ids="form.prodIds" /> <products-selector v-model="form.prodIds" :default-ids="form.prodIds" show-all @setall="isAllProduct=$event" :isall="isAllProduct" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
:label="$t('订单属性')" :label="$t('订单属性')"
...@@ -287,7 +287,8 @@ export default { ...@@ -287,7 +287,8 @@ export default {
1: [], 1: [],
2: [], 2: [],
3: [] 3: []
} },
isAllProduct: false, // 是否全部商品
}; };
}, },
computed:{ computed:{
...@@ -395,6 +396,11 @@ export default { ...@@ -395,6 +396,11 @@ export default {
if (this.$route.query.id) { if (this.$route.query.id) {
getCoupon(this.$route.query.id).then((res) => { getCoupon(this.$route.query.id).then((res) => {
this.form = res.data this.form = res.data
// 没有商品则表示全部
if(!this.form.prodIds){
this.isAllProduct = true
}
if(this.form.couponIds){ if(this.form.couponIds){
let couponIds = this.form.couponIds.split(',').filter(item => item && item != '') let couponIds = this.form.couponIds.split(',').filter(item => item && item != '')
console.log({couponIds}) console.log({couponIds})
...@@ -516,6 +522,11 @@ export default { ...@@ -516,6 +522,11 @@ export default {
data.costType = 3 data.costType = 3
} }
// 没勾选全部就需要选择商品
if(!this.isAllProduct && !this.form.prodIds){
return this.$message.error('请选择商品')
}
// 修改的提交 // 修改的提交
if (data.couponId != null) { if (data.couponId != null) {
updateCoupon(data).then((response) => { updateCoupon(data).then((response) => {
......
...@@ -720,7 +720,9 @@ export default { ...@@ -720,7 +720,9 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal.confirm(this.$t('是否确认删除客户编号为"') + id + this.$t('"的数据项?')).then(function() { const name = row.name;
const number = row.number;
this.$modal.confirm(this.$t('是否确认删除客户编号为"') + number + this.$t('"的数据项?')).then(function() {
return deleteCustomer(id); return deleteCustomer(id);
}).then(() => { }).then(() => {
this.getList(); this.getList();
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
<dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" /> <dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" />
<el-date-picker v-model="dateFilter" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker> <el-date-picker v-model="dateFilter" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('始发')" prop="startWarehouseId"> <el-form-item :label="$t('始发')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')" clearable @change="handleQuery"> <el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')" clearable @change="handleQuery">
<el-option v-for="item in expoerCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportWarehouseList" :label="item.titleZh" :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="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')" clearable @change="handleQuery"> <el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的地')" clearable @change="handleQuery">
<el-option v-for="item in importCityList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('运输方式')" prop="transportId"> <el-form-item :label="$t('运输方式')" prop="transportId">
...@@ -157,14 +157,14 @@ import Selector from '@/components/Selector' ...@@ -157,14 +157,14 @@ import Selector from '@/components/Selector'
import ProductSelector from '@/components/ProductSelector' import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr' import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector' import CustomerSelector from '@/components/CustomerSelector'
import { getTradeCityList } from '@/api/ecw/region' /* import { getTradeCityList } from '@/api/ecw/region' */
import Transfer from '@/views/ecw/order/components/Transfer' import Transfer from '@/views/ecw/order/components/Transfer'
import Release from './components/Release' import Release from './components/Release'
import CargoControlEdit from './components/CargoControlEdit' import CargoControlEdit from './components/CargoControlEdit'
import { getCargoControlOrderPage, batchReview, orderReview, getPickRleaseInfo } from "@/api/ecw/orderCargoControl" import { getCargoControlOrderPage, batchReview, orderReview, getPickRleaseInfo } from "@/api/ecw/orderCargoControl"
import TransferCargo from '@/views/ecw/order/components/TransferCargo' import TransferCargo from '@/views/ecw/order/components/TransferCargo'
import Fallback from './components/Fallback' import Fallback from './components/Fallback'
import {getWarehouseList} from '@/api/ecw/warehouse'
export default { export default {
name: "EcwOrderCargonControl", name: "EcwOrderCargonControl",
components: { components: {
...@@ -196,6 +196,7 @@ export default { ...@@ -196,6 +196,7 @@ export default {
rows: 10 rows: 10
}, },
tradeCityList: [], tradeCityList: [],
warehouseList: [],
productAttrList: [], // 商品属性 productAttrList: [], // 商品属性
molecule: '', //重货比分子 molecule: '', //重货比分子
denominator: '', //重货比分母 denominator: '', //重货比分母
...@@ -215,6 +216,12 @@ export default { ...@@ -215,6 +216,12 @@ export default {
importCityList() { importCityList() {
return this.tradeCityList.filter(item => item.type == 1) return this.tradeCityList.filter(item => item.type == 1)
}, },
exportWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
combinedQueryParams(){ combinedQueryParams(){
let timeParams = {} let timeParams = {}
if(this.dateFilterType && this.dateFilter){ if(this.dateFilterType && this.dateFilter){
...@@ -230,7 +237,8 @@ export default { ...@@ -230,7 +237,8 @@ export default {
created() { created() {
this.getList(); this.getList();
getProductAttrList().then(res => this.productAttrList = res.data) getProductAttrList().then(res => this.productAttrList = res.data)
getTradeCityList().then(res => this.tradeCityList = res.data) // getTradeCityList().then(res => this.tradeCityList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data)
}, },
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
......
...@@ -260,7 +260,7 @@ export default { ...@@ -260,7 +260,7 @@ export default {
getOrder(res.data.orderIds).then(r =>{ getOrder(res.data.orderIds).then(r =>{
this.FeeDetails = r.data this.FeeDetails = r.data
this.FeeDetails.details = JSON.parse(res.data.details) this.FeeDetails.details = JSON.parse(res.data.details)
const orderItem = this.FeeDetails.orderItemVOList.find(e => e.brand === this.FeeDetails.details.brand) const orderItem = this.FeeDetails.orderItemVOList.find(e => e.orderItemId === this.FeeDetails.details.orderItemId)
if (orderItem){ if (orderItem){
this.prodName = orderItem.prodTitleZh + '(' + orderItem.prodTitleEn + ')' this.prodName = orderItem.prodTitleZh + '(' + orderItem.prodTitleEn + ')'
} }
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
<el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!canAddProduct">{{$t('添加货物')}}</el-button> <el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!canAddProduct">{{$t('添加货物')}}</el-button>
<el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!canAddProduct">{{$t('批量添加货物')}}</el-button> <el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!canAddProduct">{{$t('批量添加货物')}}</el-button>
</div> </div>
<el-table :data="form.orderItemVOList" border class="product-list"> <el-table :data="form.orderItemVOList" border class="product-list" v-if="!initing">
<el-table-column :label="$t('序号')" width="60px" fixed> <el-table-column :label="$t('序号')" width="60px" fixed>
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.$index + 1}} {{scope.$index + 1}}
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
class="mb-0 mr-0" class="mb-0 mr-0"
> >
<product-selector <product-selector
@hook:mounted="onTableMounted"
v-model="scope.row.prodId" v-model="scope.row.prodId"
@change="onProductChange(scope.row, $event)" @change="onProductChange(scope.row, $event)"
:disabled="!canAddProduct || !productEditable" :disabled="!canAddProduct || !productEditable"
...@@ -606,6 +607,7 @@ export default { ...@@ -606,6 +607,7 @@ export default {
quickCreateType: null, // 快速新建客户类型,1发货人,2收货人 quickCreateType: null, // 快速新建客户类型,1发货人,2收货人
showWorkFlow: false, // 是否显示工作流表单 showWorkFlow: false, // 是否显示工作流表单
calculating: false, // 是否正在计算费用,防止频繁重新请求 calculating: false, // 是否正在计算费用,防止频繁重新请求
initing: true, // 初始化中
}; };
}, },
computed:{ computed:{
...@@ -787,9 +789,10 @@ export default { ...@@ -787,9 +789,10 @@ export default {
}else if(!this.form.externalWarehouseDtoList.length){ }else if(!this.form.externalWarehouseDtoList.length){
this.$set(this.form, 'externalWarehouseDtoList', [{}]) this.$set(this.form, 'externalWarehouseDtoList', [{}])
} }
}, },
/* 'form.orderItemVOList'(){
console.log('form.orderItemVOList', this.form.orderItemVOList.length, this.form.orderItemVOList)
}, */
// 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择 // 选择的路线变化后,需要判断是否开通了对应的服务,如果没开通需要取消对应的服务选择
selectedRouter(val){ selectedRouter(val){
if(!val) return if(!val) return
...@@ -826,13 +829,20 @@ export default { ...@@ -826,13 +829,20 @@ export default {
value: 2 // 1 发货人,2收货人,默认收货人,可修改 value: 2 // 1 发货人,2收货人,默认收货人,可修改
}) })
}) })
this.$nextTick(() => {
this.initing = false
})
}, },
methods: { methods: {
onTableMounted(e){
// console.warn('onTableMounted', e)
},
getOrder(){ getOrder(){
getUpdateInfo(this.$route.query.id).then(res => { getUpdateInfo(this.$route.query.id).then(res => {
this.form = {...res.data} this.form = Object.assign({}, res.data, {orderItemVOList: []})
this.form.orderItemVOList = []; /* this.form.orderItemVOList = []; */
this.form.type = this.form.type ? this.form.type.split(',').filter(item => item != '') : [] this.form.type = this.form.type ? this.form.type.split(',').filter(item => item != '') : []
this.form.packageTypeArr = this.form.packageType ? this.form.packageType.split(',').filter(item => item != '') : [] this.form.packageTypeArr = this.form.packageType ? this.form.packageType.split(',').filter(item => item != '') : []
...@@ -880,7 +890,10 @@ export default { ...@@ -880,7 +890,10 @@ export default {
}) })
}) })
} }
this.initing = false
}) })
}).catch(() => {
this.initing = false
}) })
}, },
onContactChoose(contact){ onContactChoose(contact){
......
...@@ -209,8 +209,7 @@ ...@@ -209,8 +209,7 @@
<!-- 费用申请 --> <!-- 费用申请 -->
<template v-if=" <template v-if="
exclude(scope.row.status, [0]) && exclude(scope.row.status, [0]) &&
exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14]) && exclude(scope.row.abnormalState, [1 ,99 ,2 ,3 ,4 ,9 ,10 ,11 ,12 ,14])
exclude(scope.row.shipmentState, [320,322,323])
"> ">
<el-dropdown-item @click.native="feeApplicationBol = true; orderId = scope.row.orderId" >{{$t('费用申请')}}</el-dropdown-item> <el-dropdown-item @click.native="feeApplicationBol = true; orderId = scope.row.orderId" >{{$t('费用申请')}}</el-dropdown-item>
</template> </template>
......
...@@ -624,8 +624,8 @@ export default { ...@@ -624,8 +624,8 @@ 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.warehousing.prodId, prodId: this.warehousing.prodId,
"orderWarehouseInUpdateItemDoList": this.tableData.map(e => { "orderWarehouseInUpdateItemDoList": this.tableData.map(e => {
return { return {
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
:label="$t('状态')"> :label="$t('状态')">
<dict-tag v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType" :type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS" :value="row.warehouseInInfoVO.diffType" class="red" :class="{green: row.warehouseInInfoVO.diffType === 4}"/> <dict-tag v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType" :type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS" :value="row.warehouseInInfoVO.diffType" class="red" :class="{green: row.warehouseInInfoVO.diffType === 4}"/>
<span class="red" v-else-if="row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff">{{ row.warehouseInInfoVO.cartonsNumDiff }}{{$t('箱')}}</span> <span class="red" v-else-if="row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff">{{ row.warehouseInInfoVO.cartonsNumDiff }}{{$t('箱')}}</span>
<span v-else>{{ $t('待入仓') }}</span> <span :class="{red: row.itemStatus === 3}" v-else>{{ row.itemStatus === 3 ? ($t('少了') + row.num + $t('箱')) : $t('待入仓') }}</span>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
......
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