Commit a86c99c6 authored by 我在何方's avatar 我在何方
parents ae59a43d d47fc25a
...@@ -530,6 +530,21 @@ export function createGoods(data) { ...@@ -530,6 +530,21 @@ export function createGoods(data) {
}); });
} }
/**
* 预装关联订单
*
* @export
* @param {*} data
* @return {*}
*/
export function loadRelationOrder(data) {
return request({
url: "/ecw/box-preload-goods/loadRelationOrder",
method: "post",
data,
});
}
/***************************** 预装 end **********************************/ /***************************** 预装 end **********************************/
/***************************** 装柜 start **********************************/ /***************************** 装柜 start **********************************/
......
...@@ -58,6 +58,7 @@ export default { ...@@ -58,6 +58,7 @@ export default {
let bar = this.tableData.length > 0 ? this.tableData[index] : { let bar = this.tableData.length > 0 ? this.tableData[index] : {
departureId: e.id, departureId: e.id,
objectiveIds: [], objectiveIds: [],
tradeType:e.tradeType,
checked: false checked: false
} }
const valueIndex = this.value.findIndex(v => v.departureId === e.id) const valueIndex = this.value.findIndex(v => v.departureId === e.id)
...@@ -73,7 +74,8 @@ export default { ...@@ -73,7 +74,8 @@ export default {
foo.push(bar) foo.push(bar)
index++ index++
}) })
this.tableData = foo this.tableData = foo.filter(i => i.tradeType === '2');
}, },
/** /**
* 更新 value * 更新 value
......
<template> <template>
<div class="component-upload-image"> <div class="component-upload-image">
<ul class="el-upload-list el-upload-list--picture-card">
<li tabindex="0" class="el-upload-list__item is-success" v-for="(item, index) in fileList" :key="index">
<video v-if="item.url.substr(-4) == '.mp4'" :src="item.url"></video>
<img v-else :src="item.url" :alt="item.name" class="el-upload-list__item-thumbnail">
<!-- <a class="el-upload-list__item-name">
<i class="el-icon-document"></i>
</a> -->
<label class="el-upload-list__item-status-label">
<i class="el-icon-upload-success el-icon-check"></i>
</label>
<!-- <i class="el-icon-close"></i>
<i class="el-icon-close-tip">按 delete 键可删除</i> -->
<span class="el-upload-list__item-actions">
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(item)">
<i class="el-icon-zoom-in"></i>
</span>
<span class="el-upload-list__item-delete" @click="handleRemove(item)">
<i class="el-icon-delete"></i>
</span>
</span>
</li>
</ul>
<el-upload <el-upload
multiple multiple
:action="uploadImgUrl" :action="uploadImgUrl"
...@@ -11,7 +34,7 @@ ...@@ -11,7 +34,7 @@
:on-exceed="handleExceed" :on-exceed="handleExceed"
name="file" name="file"
:on-remove="handleRemove" :on-remove="handleRemove"
:show-file-list="true" :show-file-list="false"
:headers="headers" :headers="headers"
:file-list="fileList" :file-list="fileList"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
...@@ -34,10 +57,14 @@ ...@@ -34,10 +57,14 @@
width="800" width="800"
append-to-body append-to-body
> >
<template v-if="dialogImageUrl">
<video v-if="dialogImageUrl.substr(-4) == '.mp4'" :src="dialogImageUrl" controls autoplay style="display: block; max-width: 100%; margin: 0 auto"></video>
<img <img
v-else
:src="dialogImageUrl" :src="dialogImageUrl"
style="display: block; max-width: 100%; margin: 0 auto" style="display: block; max-width: 100%; margin: 0 auto"
/> />
</template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -49,7 +76,7 @@ export default { ...@@ -49,7 +76,7 @@ export default {
props: { props: {
value: [String, Object, Array], value: [String, Object, Array],
// 图片数量限制 // 图片数量限制
limit: { limit2: {
type: Number, type: Number,
default: 5, default: 5,
}, },
...@@ -61,7 +88,7 @@ export default { ...@@ -61,7 +88,7 @@ export default {
// 文件类型, 例如['png', 'jpg', 'jpeg'] // 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: { fileType: {
type: Array, type: Array,
default: () => ["png", "jpg", "jpeg"], default: () => ["png", "jpg", "jpeg", 'mp4'],
}, },
// 是否显示提示 // 是否显示提示
isShowTip: { isShowTip: {
...@@ -81,7 +108,8 @@ export default { ...@@ -81,7 +108,8 @@ export default {
headers: { headers: {
Authorization: "Bearer " + getToken(), Authorization: "Bearer " + getToken(),
}, },
fileList: [] fileList: [],
limit: 5
}; };
}, },
watch: { watch: {
...@@ -209,5 +237,10 @@ export default { ...@@ -209,5 +237,10 @@ export default {
opacity: 0; opacity: 0;
transform: translateY(0); transform: translateY(0);
} }
.component-upload-image{
display: flex;
flex-wrap: wrap;
}
</style> </style>
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
<el-button type="primary" @click="reLoad">{{$t('搜索')}}</el-button> <el-button type="primary" @click="reLoad">{{$t('搜索')}}</el-button>
<div v-if="showAll"> <div v-if="showAll">
<el-checkbox :label="$t('全选(最多500)')" @change="toggleAll"></el-checkbox> <el-checkbox :label="$t('全选(最多500)')" @change="toggleAll" :disabled="isAllProduct"></el-checkbox>
<el-checkbox :label="$t('全选库内商品(共{cnt}个)', {cnt: total})" v-model="isAllProduct"></el-checkbox> <el-checkbox :label="$t('全选库内商品(共{cnt}个)', {cnt: total})" v-model="isAllProduct"></el-checkbox>
</div> </div>
</div> </div>
<div class="list"> <div class="list">
<div class="item" v-for="item in list" :key="item.id"> <div class="item" v-for="item in list" :key="item.id">
<el-checkbox @change="toggleCheck(item, $event)" :value="ids.indexOf(item.id) > -1" /> {{item.titleZh}} <el-checkbox @change="toggleCheck(item, $event)" :value="ids.indexOf(item.id) > -1" :disabled="isAllProduct" /> {{item.titleZh}}
<div>{{item.titleEn}}</div> <div>{{item.titleEn}}</div>
</div> </div>
</div> </div>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> </div>
<div class="list"> <div class="list">
<div class="item" v-for="(choosed) in choosedList" :key="choosed.id" :data-data="JSON.stringify(choosed)"> <div class="item" v-for="(choosed) in choosedList" :key="choosed.id" :data-data="JSON.stringify(choosed)">
<el-link class="el-icon-delete" @click="remove(choosed)" /> {{choosed.titleZh}} <el-link class="el-icon-delete" @click="remove(choosed)" :disabled="isAllProduct"/> {{choosed.titleZh}}
<div>{{choosed.titleEn}}</div> <div>{{choosed.titleEn}}</div>
</div> </div>
</div> </div>
......
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
<el-input v-model="form.customerContacts[0].name" placeholder="请输入联系人" /> <el-input v-model="form.customerContacts[0].name" placeholder="请输入联系人" />
</el-form-item> </el-form-item>
<el-form-item label="手机号" prop="customerContacts.0.phoneNew"> <el-form-item label="手机号" prop="customerContacts.0.phoneNew">
<el-select v-model="form.customerContacts[0].areaCode" placeholder="请选择区号" filterable class="w-200"> <!-- <el-select v-model="form.customerContacts[0].areaCode" placeholder="请选择区号" filterable class="w-200">
<el-option v-for="(item, index) in countryList" <el-option v-for="(item, index) in countryList"
:key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" /> :key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select> </el-select> -->
<area-code-selector v-model="form.customerContacts[0].areaCode" />
<el-input v-model="form.customerContacts[0].phoneNew" maxlength="11" placeholder="请输入联系方式" class="w-150 ml-10"/> <el-input v-model="form.customerContacts[0].phoneNew" maxlength="11" placeholder="请输入联系方式" class="w-150 ml-10"/>
</el-form-item> </el-form-item>
...@@ -56,9 +57,10 @@ import {createCustomer} from '@/api/ecw/customer' ...@@ -56,9 +57,10 @@ import {createCustomer} from '@/api/ecw/customer'
import {listServiceUser} from "@/api/system/user" import {listServiceUser} from "@/api/system/user"
import { getCountryListAll } from '@/api/ecw/country' import { getCountryListAll } from '@/api/ecw/country'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts' import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
import AreaCodeSelector from '@/components/AreaCodeSelector'
export default { export default {
name: "quickCreateCustomer", name: "quickCreateCustomer",
components: {AreaCodeSelector},
props:{ props:{
type: String, type: String,
}, },
...@@ -69,7 +71,7 @@ export default { ...@@ -69,7 +71,7 @@ export default {
// 表单参数 // 表单参数
form: { form: {
customerContacts:[{}] customerContacts:[{isDefault: 1}]
}, },
// 表单校验 // 表单校验
rules: { rules: {
......
...@@ -318,6 +318,7 @@ import { ...@@ -318,6 +318,7 @@ import {
changeSection, changeSection,
approvalCreate, approvalCreate,
approvalCancel, approvalCancel,
loadRelationOrder,
} from "@/api/ecw/boxSea"; } from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue"; import userSelect from "./common/userSelect.vue";
import { import {
...@@ -583,9 +584,25 @@ export default { ...@@ -583,9 +584,25 @@ export default {
}; };
createGoods(params).then((res) => { createGoods(params).then((res) => {
const { data } = res;
if(data.relationMsg) {
const msg = data.relationMsg.replaceAll(',',"");
this.$confirm(msg, this.$t("提示"), {
type: "warning",
})
.then((_) => {
loadRelationOrder(data).then((res) => {
serviceMsg(res, this).then(() => { serviceMsg(res, this).then(() => {
this.queryAllData(); this.queryAllData();
}) })
})
})
.catch((_) => {});
} else {
serviceMsg(res, this).then(() => {
this.queryAllData();
})
}
}).catch((res) => { }).catch((res) => {
if(res.code === 555) { if(res.code === 555) {
const msg = res.msg && res.msg.replaceAll(',',""); const msg = res.msg && res.msg.replaceAll(',',"");
......
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
return deletePickup({id}) return deletePickup({id})
}).then(res => { }).then(res => {
this.$message.success('操作成功') this.$message.success('操作成功')
this.$emit('delete', id)
}) })
}, },
closeDialog(){ closeDialog(){
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<el-card class="card"> <el-card class="card">
<el-descriptions class="mr-10" border :title="$t('基础信息')" :column="2"> <el-descriptions class="mr-10" border :title="$t('基础信息')" :column="2">
<el-descriptions-item :label="$t('唛头')">{{order.marks}}</el-descriptions-item> <el-descriptions-item :label="$t('唛头')">{{order.marks}}</el-descriptions-item>
<el-descriptions-item :label="$t('送货时间')">{{order.deliveryDate}}</el-descriptions-item> <el-descriptions-item :label="$t('送货时间')" v-if="!order.isExternalWarehouse">{{order.deliveryDate}}</el-descriptions-item>
<el-descriptions-item :label="$t('是否控货')"> <el-descriptions-item :label="$t('是否控货')">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="order.isCargoControl" /> <dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="order.isCargoControl" />
</el-descriptions-item> </el-descriptions-item>
......
...@@ -725,7 +725,7 @@ export default { ...@@ -725,7 +725,7 @@ export default {
'form.objectiveId'(){ 'form.objectiveId'(){
this.getOpenedRouterList() this.getOpenedRouterList()
}, },
'form.transportId'(transportId){ 'form.transportId'(transportId, oldTransportId){
// 海运拼柜给表单默认值 // 海运拼柜给表单默认值
if(this.form.transportId == 4){ if(this.form.transportId == 4){
this.$nextTick(() => { this.$nextTick(() => {
...@@ -738,7 +738,8 @@ export default { ...@@ -738,7 +738,8 @@ export default {
}) })
} }
// 更换运输方式之后,之前选择的路线会失效,需要重新选择 // 更换运输方式之后,之前选择的路线会失效,需要重新选择
if(transportId != this.selectedRouter?.transportType){ if(oldTransportId && oldTransportId != transportId && transportId != this.selectedRouter?.transportType){
console.log('重置路线',oldTransportId, transportId, this.selectedRouter?.transportType)
this.$set(this.form, 'lineId', undefined) this.$set(this.form, 'lineId', undefined)
} }
...@@ -869,7 +870,7 @@ export default { ...@@ -869,7 +870,7 @@ export default {
console.log('选择联系人', contact) console.log('选择联系人', contact)
if(!this.contactChooseType && !this.quickCreateType) return if(!this.contactChooseType && !this.quickCreateType) return
if(!this.contactChooseType && this.quickCreateType){ if(!this.contactChooseType && this.quickCreateType){
this.contactChooseType = this.quickCreateType == 1 ? 'consignor' : 'consignee' this.contactChooseType = this.quickCreateType == 0 ? 'consignor' : 'consignee'
} }
this.$set(this.form, this.contactChooseType + 'Company', contact.company) this.$set(this.form, this.contactChooseType + 'Company', contact.company)
this.$set(this.form, this.contactChooseType + 'ContactsId', contact.customerContactsId) this.$set(this.form, this.contactChooseType + 'ContactsId', contact.customerContactsId)
......
...@@ -379,7 +379,7 @@ ...@@ -379,7 +379,7 @@
<batch-single-application :order-list="orderId" :dialog-visible.sync="warehouseBol"></batch-single-application> <batch-single-application :order-list="orderId" :dialog-visible.sync="warehouseBol"></batch-single-application>
<fee-application :order-id="orderId" :dialog-visible.sync="feeApplicationBol"></fee-application> <fee-application :order-id="orderId" :dialog-visible.sync="feeApplicationBol"></fee-application>
<merge-log :order-no="showMergedLogOrderNo" v-if="showMergedLogOrderNo !== null" @close="showMergedLogOrderNo=null" /> <merge-log :order-no="showMergedLogOrderNo" v-if="showMergedLogOrderNo !== null" @close="showMergedLogOrderNo=null" />
<pickup-log v-if="showPickupLogOrderNo" :order-no="showPickupLogOrderNo" @close="showPickupLogOrderNo=null" /> <pickup-log v-if="showPickupLogOrderNo" :order-no="showPickupLogOrderNo" @close="showPickupLogOrderNo=null" @delete="getList" />
</div> </div>
</template> </template>
......
...@@ -102,6 +102,9 @@ ...@@ -102,6 +102,9 @@
<el-option v-for="dict in regionTypeDatas" :key="dict.value" :label="dict.label" :value="dict.value"/> <el-option v-for="dict in regionTypeDatas" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="国家城市代码" prop="labelCode" v-if="form.type == '1' || form.type == '3' ">
<el-input v-model="form.labelCode" placeholder="请输入国家代码-城市代码" />
</el-form-item>
<el-form-item label="显示顺序" prop="sort"> <el-form-item label="显示顺序" prop="sort">
<el-input v-model="form.sort" placeholder="请输入显示顺序" /> <el-input v-model="form.sort" placeholder="请输入显示顺序" />
</el-form-item> </el-form-item>
...@@ -185,6 +188,7 @@ export default { ...@@ -185,6 +188,7 @@ export default {
titleEn: [{ required: true, message: "英文名称不能为空", trigger: "blur" }], titleEn: [{ required: true, message: "英文名称不能为空", trigger: "blur" }],
shortName: [{ required: true, message: "简称不能为空", trigger: "blur" }], shortName: [{ required: true, message: "简称不能为空", trigger: "blur" }],
// language: [{ required: true, message: "语言不能为空", trigger: "blur" }], // language: [{ required: true, message: "语言不能为空", trigger: "blur" }],
labelCode: [{ required: true, message: "国家城市代码不能为空", trigger: "blur" }],
// type: [{ required: true, message: "类型不能为空", trigger: "change" }], // type: [{ required: true, message: "类型不能为空", trigger: "change" }],
// parentId: [{ required: true, message: "父区域id不能为空", trigger: "blur" }], // parentId: [{ required: true, message: "父区域id不能为空", trigger: "blur" }],
sort: [{ required: true, message: "显示顺序不能为空", trigger: "blur" }], sort: [{ required: true, message: "显示顺序不能为空", trigger: "blur" }],
......
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