Commit a86c99c6 authored by 我在何方's avatar 我在何方
parents ae59a43d d47fc25a
......@@ -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 **********************************/
/***************************** 装柜 start **********************************/
......
......@@ -6,7 +6,7 @@
<el-table-column
width="250px"
label="始发地">
<template v-slot="{ row, column, $index }">
<template v-slot="{ row, column, $index }">
<el-checkbox v-model="row.checked" @change="updateValue(true)">{{ warehouseList[$index].titleZh }}</el-checkbox>
</template>
</el-table-column>
......@@ -58,6 +58,7 @@ export default {
let bar = this.tableData.length > 0 ? this.tableData[index] : {
departureId: e.id,
objectiveIds: [],
tradeType:e.tradeType,
checked: false
}
const valueIndex = this.value.findIndex(v => v.departureId === e.id)
......@@ -73,7 +74,8 @@ export default {
foo.push(bar)
index++
})
this.tableData = foo
this.tableData = foo.filter(i => i.tradeType === '2');
},
/**
* 更新 value
......
<template>
<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
multiple
:action="uploadImgUrl"
......@@ -11,7 +34,7 @@
:on-exceed="handleExceed"
name="file"
:on-remove="handleRemove"
:show-file-list="true"
:show-file-list="false"
:headers="headers"
:file-list="fileList"
:on-preview="handlePictureCardPreview"
......@@ -34,10 +57,14 @@
width="800"
append-to-body
>
<img
:src="dialogImageUrl"
style="display: block; max-width: 100%; margin: 0 auto"
/>
<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
v-else
:src="dialogImageUrl"
style="display: block; max-width: 100%; margin: 0 auto"
/>
</template>
</el-dialog>
</div>
</template>
......@@ -49,7 +76,7 @@ export default {
props: {
value: [String, Object, Array],
// 图片数量限制
limit: {
limit2: {
type: Number,
default: 5,
},
......@@ -61,7 +88,7 @@ export default {
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ["png", "jpg", "jpeg"],
default: () => ["png", "jpg", "jpeg", 'mp4'],
},
// 是否显示提示
isShowTip: {
......@@ -81,7 +108,8 @@ export default {
headers: {
Authorization: "Bearer " + getToken(),
},
fileList: []
fileList: [],
limit: 5
};
},
watch: {
......@@ -209,5 +237,10 @@ export default {
opacity: 0;
transform: translateY(0);
}
.component-upload-image{
display: flex;
flex-wrap: wrap;
}
</style>
......@@ -13,13 +13,13 @@
<el-button type="primary" @click="reLoad">{{$t('搜索')}}</el-button>
<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>
</div>
</div>
<div class="list">
<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>
</div>
......@@ -32,7 +32,7 @@
</div>
<div class="list">
<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>
</div>
......
......@@ -12,10 +12,11 @@
<el-input v-model="form.customerContacts[0].name" placeholder="请输入联系人" />
</el-form-item>
<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"
: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-form-item>
......@@ -56,9 +57,10 @@ import {createCustomer} from '@/api/ecw/customer'
import {listServiceUser} from "@/api/system/user"
import { getCountryListAll } from '@/api/ecw/country'
import {getCustomerContactsSelect} from '@/api/ecw/customerContacts'
import AreaCodeSelector from '@/components/AreaCodeSelector'
export default {
name: "quickCreateCustomer",
components: {AreaCodeSelector},
props:{
type: String,
},
......@@ -69,7 +71,7 @@ export default {
// 表单参数
form: {
customerContacts:[{}]
customerContacts:[{isDefault: 1}]
},
// 表单校验
rules: {
......
......@@ -318,6 +318,7 @@ import {
changeSection,
approvalCreate,
approvalCancel,
loadRelationOrder,
} from "@/api/ecw/boxSea";
import userSelect from "./common/userSelect.vue";
import {
......@@ -583,9 +584,25 @@ export default {
};
createGoods(params).then((res) => {
serviceMsg(res, this).then(() => {
this.queryAllData();
})
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(() => {
this.queryAllData();
})
})
})
.catch((_) => {});
} else {
serviceMsg(res, this).then(() => {
this.queryAllData();
})
}
}).catch((res) => {
if(res.code === 555) {
const msg = res.msg && res.msg.replaceAll(',',"");
......
......@@ -49,6 +49,7 @@ export default {
return deletePickup({id})
}).then(res => {
this.$message.success('操作成功')
this.$emit('delete', id)
})
},
closeDialog(){
......
......@@ -56,7 +56,7 @@
<el-card class="card">
<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.deliveryDate}}</el-descriptions-item>
<el-descriptions-item :label="$t('送货时间')" v-if="!order.isExternalWarehouse">{{order.deliveryDate}}</el-descriptions-item>
<el-descriptions-item :label="$t('是否控货')">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="order.isCargoControl" />
</el-descriptions-item>
......
......@@ -725,7 +725,7 @@ export default {
'form.objectiveId'(){
this.getOpenedRouterList()
},
'form.transportId'(transportId){
'form.transportId'(transportId, oldTransportId){
// 海运拼柜给表单默认值
if(this.form.transportId == 4){
this.$nextTick(() => {
......@@ -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)
}
......@@ -869,7 +870,7 @@ export default {
console.log('选择联系人', contact)
if(!this.contactChooseType && !this.quickCreateType) return
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 + 'ContactsId', contact.customerContactsId)
......
......@@ -379,7 +379,7 @@
<batch-single-application :order-list="orderId" :dialog-visible.sync="warehouseBol"></batch-single-application>
<fee-application :order-id="orderId" :dialog-visible.sync="feeApplicationBol"></fee-application>
<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>
</template>
......
......@@ -102,6 +102,9 @@
<el-option v-for="dict in regionTypeDatas" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</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-input v-model="form.sort" placeholder="请输入显示顺序" />
</el-form-item>
......@@ -185,6 +188,7 @@ export default {
titleEn: [{ required: true, message: "英文名称不能为空", trigger: "blur" }],
shortName: [{ required: true, message: "简称不能为空", trigger: "blur" }],
// language: [{ required: true, message: "语言不能为空", trigger: "blur" }],
labelCode: [{ required: true, message: "国家城市代码不能为空", trigger: "blur" }],
// type: [{ required: true, message: "类型不能为空", trigger: "change" }],
// parentId: [{ required: true, message: "父区域id不能为空", 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