ZR20090193-陈敬勇 7 months ago
commit b4dd1e72c0

@ -157,6 +157,7 @@
"vite-plugin-vue-setup-extend": "^0.4.0",
"vite-plugin-windicss": "^1.8.4",
"vite-ssg": "^0.23.1",
"vue-easytable": "^2.27.1",
"vue-eslint-parser": "^8.3.0",
"vue-tsc": "^1.8.11"
},

@ -19,7 +19,9 @@ import '/@/styles/element/index.scss'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'vxe-table/lib/style.css'
if (isDevMode()) {
import('ant-design-vue/es/style')
}

@ -1,20 +1,25 @@
[
{ "FieldName": "MBLNO", "FieldValue": "1", "ConditionalType": 1 },
{
"ConditionalList": [
{ "Key": 0, "Value": { "FieldName": "Cntr10", "FieldValue": "equal", "ConditionalType": 2 } },
{
"Key": -1,
"Value": {
"FieldName": "id",
"FieldValue": "2",
"ConditionalType": 0
}
"Key": 0,
"Value": { "FieldName": "MasterNo", "FieldValue": "contains", "ConditionalType": 12412 }
},
{
"Key": 0,
"Value": {
"FieldName": "name",
"FieldValue": "2",
"ConditionalType": 0
"ConditionalList": [
{
"Key": 0,
"Value": { "FieldName": "BSNO", "FieldValue": "GreaterThan", "ConditionalType": 1 }
},
{
"Key": 0,
"Value": { "FieldName": "BusinessDate", "FieldValue": "equal", "ConditionalType": 2 }
}
]
}
},
{
@ -22,20 +27,16 @@
"Value": {
"ConditionalList": [
{
"Key": -1,
"Key": 1,
"Value": {
"FieldName": "price",
"FieldValue": "1",
"ConditionalType": 0
"FieldName": "BusinessStatus",
"FieldValue": "GreaterThanOrEqual",
"ConditionalType": 3
}
},
{
"Key": 0,
"Value": {
"FieldName": "CustomId",
"FieldValue": "1",
"ConditionalType": 0
}
"Key": 1,
"Value": { "FieldName": "Yard", "FieldValue": "equal", "ConditionalType": 4 }
}
]
}

@ -5,7 +5,7 @@
:class="!Showtabs ? 'Showtabs' : ''"
:tabBarStyle="tabBarStyle"
:activeKey="tabActiveKey"
:animated="Object.keys($refs).includes('sedOrder') ? false : true"
:animated="Object.keys($refs).includes('RefsedOrder') ? false : true"
@change="changeTab"
>
<a-tab-pane key="1" tab="主单信息" :forceRender="true">
@ -82,7 +82,7 @@
@changeDetail="changeDetailFun"
></cargoInfo>
<goodsTable
ref="goodsTable"
ref="RefgoodsTable"
:details="bookingDetails"
:rules="tableRules"
isParent="parent"
@ -98,7 +98,7 @@
</div>
<div id="tab-content2" class="tab-content" v-show="mainOrderActiveKey === '2-2'">
<ediMore
ref="ediMore"
ref="RefediMore"
class="pane-box"
:details="bookingDetails"
:rules="ediRules"
@ -125,7 +125,7 @@
</a-col>
<a-col :span="6" style="padding-left: 8px">
<rightContent
ref="rightContent"
ref="RefrightContent"
:id="id"
:details="bookingDetails"
:excuteRules="excuteRules"
@ -143,6 +143,24 @@
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane
key="2"
tab="分单信息"
:forceRender="true"
v-show="bookingDetails.hbList && bookingDetails.hbList.length > 0"
>
<sedOrder
ref="RefsedOrder"
:details="bookingDetails"
:parSedOrderList="bookingDetails.hbList"
:isAdd="isAdd"
:checkFrom="checkFrom"
:scrollTop="scrollTop"
@changeHB="changeHBFun"
@sedOrderRemove="sedOrderRemoveFun"
>
</sedOrder>
</a-tab-pane>
</a-tabs>
</div>
</template>
@ -186,6 +204,10 @@
import basicInfo from './modules/basicInfo.vue'
import mailingInfo from './modules/mailingInfo.vue'
import cargoInfo from './modules/cargoInfo.vue'
import goodsTable from './modules/goodsTable.vue'
import ediMore from './modules/ediMore.vue'
import rightContent from './modules/rightContent.vue'
import sedOrder from './modules/sedOrder.vue'
const initDetail = {
id: 0,
parentId: 0,
@ -397,15 +419,15 @@
const inChildLoading = ref(false)
const scrollTop = ref(0)
const iframe = ref()
const rightContent = ref()
const RefrightContent = ref()
const excuteRules = ref([])
const excuteRulesType = ref('')
const sedOrder = ref()
const goodsTable = ref()
const RefsedOrder = ref()
const RefgoodsTable = ref()
const RefbasicInfo = ref()
const RefmailingInfo = ref()
const RefcargoInfo = ref()
const ediMore = ref()
const RefediMore = ref()
const mainOrderActiveKey = ref('1-1')
const ediRules = ref(rules.ediRules)
const checkFrom = ref([])
@ -483,9 +505,9 @@
isCopy: isCopy.value,
id: id.value,
}
if (Object.keys(that.$refs).includes('sedOrder')) {
const secActive = sedOrder.value.$data.editIndex
hisData.secActive = secActive
if (Object.keys(that.$refs).includes('RefsedOrder')) {
const secActive = RefsedOrder.value.$data.editIndex
hisData.RefsedOrder = secActive
}
historyData.value[`copy-${id.value}`] = hisData
} else if (route.query.addNum) {
@ -500,9 +522,9 @@
isCopy: isCopy.value,
// id: id.value
}
if (Object.keys(that.$refs).includes('sedOrder')) {
const secActive = sedOrder.value.$data.editIndex
hisData.secActive = secActive
if (Object.keys(that.$refs).includes('RefsedOrder')) {
const secActive = RefsedOrder.value.$data.editIndex
hisData.RefsedOrder = secActive
}
historyData.value[`add-${route.query.addNum}`] = hisData
} else {
@ -517,8 +539,8 @@
isCopy: isCopy.value,
id: id.value,
}
if (Object.keys(that.$refs).includes('sedOrder')) {
const secActive = sedOrder.value.$data.editIndex
if (Object.keys(that.$refs).includes('RefsedOrder')) {
const secActive = RefsedOrder.value.$data.editIndex
hisData.secActive = secActive
}
historyData.value[id.value] = hisData
@ -554,8 +576,8 @@
isCopy: isCopy.value,
id: id.value,
}
if (Object.keys(this.$refs).includes('sedOrder')) {
const secActive = sedOrder.value.$data.editIndex
if (Object.keys(this.$refs).includes('RefsedOrder')) {
const secActive = RefsedOrder.value.$data.editIndex
hisData.secActive = secActive
}
if (!route.query.copyId) {
@ -575,8 +597,8 @@
isCopy: isCopy.value,
// id: id.value
}
if (Object.keys(that.$refs).includes('sedOrder')) {
const secActive = sedOrder.value.$data.editIndex
if (Object.keys(that.$refs).includes('RefsedOrder')) {
const secActive = RefsedOrder.value.$data.editIndex
hisData.secActive = secActive
}
historyData.value[`add-${route.query.addNum}`] = hisData
@ -592,8 +614,8 @@
isCopy: isCopy.value,
id: id.value,
}
if (Object.keys(that.$refs).includes('sedOrder')) {
const secActive = sedOrder.value.$data.editIndex
if (Object.keys(that.$refs).includes('RefsedOrder')) {
const secActive = RefsedOrder.value.$data.editIndex
hisData.secActive = secActive
}
historyData.value[id.value] = hisData
@ -642,17 +664,17 @@
setTimeout(() => {
if (bookingDetails.value.hbList && bookingDetails.value.hbList.length > 0) {
Showtabs.value = true
if (Object.keys(that.$refs).includes('sedOrder')) {
sedOrder.value.init(bookingDetails.value.hbList)
if (Object.keys(that.$refs).includes('RefsedOrder')) {
RefsedOrder.value.init(bookingDetails.value.hbList)
}
} else {
Showtabs.value = false
if (Object.keys(that.$refs).includes('sedOrder')) {
sedOrder.value.init([])
if (Object.keys(that.$refs).includes('RefsedOrder')) {
RefsedOrder.value.init([])
}
}
if (Object.keys(that.$refs).includes('goodsTable')) {
goodsTable.value.init()
RefgoodsTable.value.init()
}
}, 200)
setTimeout(() => {
@ -689,17 +711,17 @@
setTimeout(() => {
if (bookingDetails.value.hbList && bookingDetails.value.hbList.length > 0) {
Showtabs.value = true
if (Object.keys(that.$refs).includes('sedOrder')) {
sedOrder.value.init(bookingDetails.value.hbList)
if (Object.keys(that.$refs).includes('RefsedOrder')) {
RefsedOrder.value.init(bookingDetails.value.hbList)
}
} else {
Showtabs.value = false
if (Object.keys(that.$refs).includes('sedOrder')) {
sedOrder.value.init([])
if (Object.keys(that.$refs).includes('RefsedOrder')) {
RefsedOrder.value.init([])
}
}
if (Object.keys(that.$refs).includes('goodsTable')) {
goodsTable.value.init()
RefgoodsTable.value.init()
}
}, 200)
setTimeout(() => {
@ -767,17 +789,17 @@
setTimeout(() => {
if (bookingDetails.value.hbList && bookingDetails.value.hbList.length > 0) {
Showtabs.value = true
if (Object.keys(that.$refs).includes('sedOrder')) {
sedOrder.value.init(bookingDetails.value.hbList)
if (Object.keys(that.$refs).includes('RefsedOrder')) {
RefsedOrder.value.init(bookingDetails.value.hbList)
}
} else {
Showtabs.value = false
if (Object.keys(that.$refs).includes('sedOrder')) {
sedOrder.value.init([])
if (Object.keys(that.$refs).includes('RefsedOrder')) {
RefsedOrder.value.init([])
}
}
if (Object.keys(that.$refs).includes('goodsTable')) {
goodsTable.value.init()
RefgoodsTable.value.init()
}
}, 200)
setTimeout(() => {
@ -910,7 +932,7 @@
}
function handleSaveService(data) {
if (route.query.id) {
rightContent.value.saveServiceBasic(data)
RefrightContent.value.saveServiceBasic(data)
}
}
function changeDetailFun(data) {
@ -931,15 +953,15 @@
bookingDetails.value.cntrtotal = str
}
function handleRefshTable() {
goodsTable.value.loadingTable = true
RefgoodsTable.value.loadingTable = true
GetCtnListRefsh({ orderId: bookingDetails.value.id }).then((res) => {
if (res.success) {
bookingDetails.value.ctnInputs = res.data
goodsTable.value.init()
RefgoodsTable.value.init()
} else {
notification.error({ message: res.message, duration: 3 })
}
goodsTable.value.loadingTable = false
RefgoodsTable.value.loadingTable = false
})
}
function changeTotalFun(data) {
@ -989,7 +1011,7 @@
function changeTab(e) {
tabActiveKey.value = e
setTimeout(() => {
sedOrder.value.init(bookingDetails.value.hbList)
RefsedOrder.value.init(bookingDetails.value.hbList)
}, 100)
}
function refreshPage() {
@ -1006,7 +1028,7 @@
}
setTimeout(() => {
init()
rightContent.value.init()
RefrightContent.value.init()
}, 100)
}
function init() {
@ -1027,11 +1049,11 @@
getFilter()
getDefaultVal()
setTimeout(() => {
if (Object.keys(that.$refs).includes('sedOrder')) {
sedOrder.value.init([])
if (Object.keys(that.$refs).includes('RefsedOrder')) {
RefsedOrder.value.init([])
}
if (Object.keys(that.$refs).includes('goodsTable')) {
goodsTable.value.init()
RefgoodsTable.value.init()
}
detailsLoadOver.value = true
}, 200)
@ -1318,7 +1340,7 @@
tabActiveKey.value = '2'
Showtabs.value = true
setTimeout(() => {
sedOrder.value.init(bookingDetails.value.hbList)
RefsedOrder.value.init(bookingDetails.value.hbList)
}, 200)
}
function removeOrderFun() {
@ -1362,7 +1384,7 @@
bookingDetails.value.cntrtotal = slots[0].ctN_STAT
bookingDetails.value.startETA = slots[0].eta
that.$forceUpdate()
goodsTable.value.init()
RefgoodsTable.value.init()
}
function handleSaveCtnList(data, slots) {
const arr = []
@ -1373,7 +1395,7 @@
})
bookingDetails.value.ctnInputs = arr
bookingDetails.value.slots = slots
goodsTable.value.init()
RefgoodsTable.value.init()
}
function handleSetCtnList() {
bookingDetails.value.slots = []
@ -1454,9 +1476,9 @@
notification.error({ message: '保存失败,请检查必填项', duration: 3 })
return false
}
if (ediMore.value) {
if (RefediMore.value) {
let ediFrom = true
ediMore.value.$refs.ediFrom.validate((valid) => {
RefediMore.value.$refs.ediFrom.validate((valid) => {
ediFrom = valid
})
if (!ediFrom) {
@ -1601,7 +1623,7 @@
setTimeout(() => {
inAddSave.value = false
getRightAll()
rightContent.value.init()
RefrightContent.value.init()
}, 2000)
} else if (that.$route.query.mblno === that.bookingDetails.mblno) {
that.isCopy = false
@ -1690,7 +1712,7 @@
kindpkgs = item.kindpkgs
})
const refsh = () => {
goodsTable.value.handleRefsh()
RefgoodsTable.value.handleRefsh()
}
const check = () => {
if (bookingDetails.value.id !== 0) {
@ -1882,8 +1904,8 @@
isCopy: isCopy.value,
id: id.value,
}
if (Object.keys(that.$refs).includes('sedOrder')) {
const secActive = sedOrder.value.$data.editIndex
if (Object.keys(that.$refs).includes('RefsedOrder')) {
const secActive = RefsedOrder.value.$data.editIndex
hisData.secActive = secActive
}
historyData.value[`copyMore-${id.value}`] = hisData
@ -1901,13 +1923,13 @@
Showtabs.value = true
}
if (!hasHbList.value && bookingDetails.value.hbList.length > 0) {
sedOrder.value.init(bookingDetails.value.hbList)
RefsedOrder.value.init(bookingDetails.value.hbList)
hasHbList.value = true
} else {
sedOrder.value.init([])
RefsedOrder.value.init([])
}
if (bookingDetails.value.ctnInputs.length > 0) {
goodsTable.value.init()
RefgoodsTable.value.init()
}
}, 1200)
that.$forceUpdate()
@ -2130,6 +2152,25 @@
lastPages[key] = $data
appStore.setneedSavePages(lastPages)
}
function changeHBFun(data) {
const arr = []
data.map((item: any) => {
arr.push(item.isNoSave)
})
if (arr.includes(true)) {
bookingDetails.value.hbList = data
checkSaveFun({ type: 'hbList', hasChange: true })
} else {
checkSaveFun({ type: 'hbList', hasChange: false })
}
}
function sedOrderRemoveFun(sedData) {
bookingDetails.value.hbList = sedData
if (sedData.length === 0) {
Showtabs.value = false
tabActiveKey.value = '1'
}
}
</script>
<style lang="less" scoped>
@import url('./style/index.less');

@ -29,7 +29,7 @@
></div>
<div>Marks & Nos.(标记与号码)</div>
</div>
<a-form-item has-feedback prop="marks" class="textarea-label" label="">
<a-form-item has-feedback name="marks" class="textarea-label" label="">
<div class="bottom">
<textareaView
class="input-box"
@ -53,18 +53,922 @@
</div>
</a-form-item>
</a-col>
<a-col :span="10">
<div class="line">
<div class="left">
<div
class="title"
:class="{ required: rules['description'] && rules['description'][0].required }"
>
<span
@click="handleOpen(2)"
style="cursor: pointer; color: black; margin: 0px"
class="copy-btn iconfont icon-bianji"
></span>
Description of Goods (包装种类与货名)</div
>
<a-form-item
has-feedback
name="goodsname"
label=""
:class="{
'goods-name-box': rules['goodsname'] && rules['goodsname'][0].required,
}"
>
<i
style="top: 4px"
class="icon required goods-required"
v-if="rules['goodsname'] && rules['goodsname'][0].required"
></i>
<selectView
type="goodsname"
:defaultVal="details.goodsname"
searchApi="getGoodsname"
:disabled="BookingLockOrder['goodsname'] && isLockBooking"
:searchQuery="{ queryItem: '', top: 50 }"
:showLabel="['goodsNameEN', 'goodsCode']"
:openSearch="true"
@change="getSelectViewRes"
style="width: 75%; max-width: 210px"
></selectView>
</a-form-item>
</div>
<div class="cargo-mark">
<div
:class="{ required: rules['cargoid'] && rules['cargoid'][0].required }"
class="tit"
>货物标志</div
>
<a-form-item
class="cargoid"
has-feedback
name="cargoid"
label=""
style="margin-top: -6px"
>
<selectView
type="cargoid"
:defaultVal="details.cargoid"
searchApi="cargoData"
:searchQuery="{ name: '' }"
:disabled="BookingLockOrder['cargoid'] && isLockBooking"
:showLabel="['name']"
:openSearch="false"
@change="getSelectViewRes"
style="width: 120px; margin-top: 7px"
></selectView>
</a-form-item>
</div>
<div class="input">
<div
:class="{ required: rules['hscode'] && rules['hscode'][0].required }"
calss="tit"
>HS编码</div
>
<a-form-item
class="cargoid"
has-feedback
name="hscode"
label=""
style="margin-top: -2px"
>
<inputView
:ishd="BookingLockOrder['hscode'] && isLockBooking"
type="hscode"
size="small"
:parentVal="details.hscode"
@getInputChange="inputChange"
/>
</a-form-item>
</div>
</div>
<a-form-item has-feedback name="description" class="textarea-label" label="">
<div class="bottom">
<textareaView
id="description-scroll"
class="input-box"
:parentVal="details.description"
:disabled="BookingLockOrder['description'] && isLockBooking"
type="description"
:height="100"
:openToCDB="true"
@getTextareaChange="getTextareaChange"
/>
<div
class="line-count"
id="description-scroll-right"
v-if="Object.keys(details).length > 1 && details.description.length > 1"
>
<div v-for="(num, index) in details.description.split('\n')" :key="index">{{
num.length
}}</div>
</div>
</div>
</a-form-item>
</a-col>
<a-col :span="9">
<a-col :span="12">
<a-form-item
class="from-label pkgs-line-box"
label="件数"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
name="pkgs"
>
<div class="line-box">
<a-input
:allowClear="true"
size="small"
:disabled="BookingLockOrder['pkgs'] && isLockBooking"
v-model="details.pkgs"
type="number"
@change="changePkgs"
/>
<i
class="iconfont icon-bianji1 edit-icon"
@click="editTextEntryModel('pkgs')"
></i>
</div>
</a-form-item>
</a-col>
<a-col :span="12" style="overflow: hidden">
<a-form-item
class="from-label"
label="包装"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
name="kindpkgs"
>
<selectView
type="kindpkgs"
:defaultVal="details.kindpkgs"
searchApi="GetPackage"
:disabled="BookingLockOrder['kindpkgs'] && isLockBooking"
:searchQuery="{ KeyWord: '' }"
:showLabel="['name']"
:openSearch="false"
@change="getSelectViewRes"
>
</selectView>
</a-form-item>
</a-col>
<a-col :span="12" style="overflow: hidden">
<a-form-item
class="from-label kgs-line-box"
label="毛重"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
name="kgs"
>
<div class="line-box">
<a-input
:disabled="BookingLockOrder['kgs'] && isLockBooking"
size="small"
:allowClear="true"
v-model="details.kgs"
/>
<i
class="iconfont icon-bianji1 edit-icon"
@click="editTextEntryModel('kgs')"
></i>
<span class="unit">KGS</span>
</div>
</a-form-item>
</a-col>
<a-col :span="12" style="overflow: hidden">
<a-form-item
class="from-label cbm-line-box"
label="尺寸"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
name="cbm"
>
<div class="line-box">
<a-input
:disabled="BookingLockOrder['cbm'] && isLockBooking"
size="small"
:allowClear="true"
v-model="details.cbm"
/>
<i
class="iconfont icon-bianji1 edit-icon"
@click="editTextEntryModel('cbm')"
></i>
<span class="unit">CBM</span>
</div>
</a-form-item>
</a-col>
<template v-if="details.cargoid == 'R'">
<a-col :span="12">
<a-form-item
class="from-label"
label="设置温度"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
name="tempset"
>
<inputView
:ishd="BookingLockOrder['tempset'] && isLockBooking"
type="tempset"
size="small"
:parentVal="details.tempset"
@getInputChange="inputChange"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
class="from-label"
label="冷藏通风量"
:labelCol="labelColCode"
:wrapperCol="wrapperColCode"
has-feedback
name="reeferf"
>
<inputView
:ishd="BookingLockOrder['reeferf'] && isLockBooking"
type="reeferf"
size="small"
:parentVal="details.reeferf"
@getInputChange="inputChange"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
class="from-label"
label="温度单位"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
name="tempid"
>
<a-select
:disabled="BookingLockOrder['tempid'] && isLockBooking"
size="small"
:default-value="details.tempid || 'C摄氏'"
v-model="details.tempid"
>
<a-select-option value="C"> C摄氏 </a-select-option>
<a-select-option value="F"> F华氏 </a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
class="from-label"
label="最低温度"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
name="tempmin"
>
<inputView
:ishd="BookingLockOrder['tempmin'] && isLockBooking"
type="tempmin"
size="small"
:parentVal="details.tempmin"
@getInputChange="inputChange"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
class="from-label"
label="最高温度"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
name="tempmax"
>
<inputView
:ishd="BookingLockOrder['tempmax'] && isLockBooking"
type="tempmax"
size="small"
:parentVal="details.tempmax"
@getInputChange="inputChange"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
class="from-label"
label="湿度"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
name="humidity"
>
<inputView
:ishd="BookingLockOrder['humidity'] && isLockBooking"
type="humidity"
size="small"
:parentVal="details.humidity"
@getInputChange="inputChange"
/>
</a-form-item>
</a-col>
</template>
<template v-if="details.cargoid == 'D'">
<a-col :span="12">
<a-form-item
class="from-label"
label="危险品等级"
:labelCol="labelColCode"
:wrapperCol="wrapperColCode"
has-feedback
name="dclass"
>
<inputView
:ishd="BookingLockOrder['dclass'] && isLockBooking"
type="dclass"
size="small"
:parentVal="details.dclass"
@getInputChange="inputChange"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
class="from-label"
label="危险品编号"
:labelCol="labelColCode"
:wrapperCol="wrapperColCode"
has-feedback
name="dunno"
>
<inputView
:ishd="BookingLockOrder['dunno'] && isLockBooking"
type="dunno"
size="small"
:parentVal="details.dunno"
@getInputChange="inputChange"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
class="from-label"
label="危险品页号"
:labelCol="labelColCode"
:wrapperCol="wrapperColCode"
has-feedback
name="dpage"
>
<inputView
:ishd="BookingLockOrder['dpage'] && isLockBooking"
type="dpage"
size="small"
:parentVal="details.dpage"
@getInputChange="inputChange"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
class="from-label"
label="危险品标签"
:labelCol="labelColCode"
:wrapperCol="wrapperColCode"
has-feedback
name="dlabel"
>
<inputView
:ishd="BookingLockOrder['dlabel'] && isLockBooking"
type="dlabel"
size="small"
:parentVal="details.dlabel"
@getInputChange="inputChange"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
class="from-label"
label="危险品联系人"
:labelCol="{
xs: { span: 24 },
sm: { span: 10 },
md: { span: 12 },
}"
:wrapperCol="{
xs: { span: 24 },
sm: { span: 14 },
md: { span: 12 },
}"
has-feedback
name="linkman"
>
<inputView
:ishd="BookingLockOrder['linkman'] && isLockBooking"
type="linkman"
size="small"
:parentVal="details.linkman"
@getInputChange="inputChange"
/>
</a-form-item>
</a-col>
</template>
</a-col>
<a-col class="num-box" :span="24">
<span class="label">件数大写: </span>
<a-input
:allowClear="true"
class="input-val num-box-right"
v-model="details.totalno"
disabled
placeholder="自动生成"
/>
</a-col>
</a-row>
</a-form>
</div>
<a-modal
:title="modelTitle"
:width="900"
:visible="visible"
@ok="visible = false"
@cancel="visible = false"
>
<div>
<div v-if="modelType === 1" style="display: flex">
<textareaView
class="input-box"
id="marks-scroll"
:parentVal="details.marks"
type="marks"
:height="500"
style="font-size: 20px; margin-right: 10px"
:openToCDB="true"
@getTextareaChange="getTextareaChange"
/>
<div
class="line-count"
id="marks-scroll-right"
v-if="Object.keys(details).length > 1 && details.marks.length > 1"
>
<div v-for="(num, index) in details.marks.split('\n')" :key="index">{{
num.length
}}</div>
</div>
</div>
<div v-if="modelType === 2" style="display: flex">
<textareaView
id="description-scroll"
class="input-box"
:parentVal="details.description"
type="description"
:height="500"
style="font-size: 20px; margin-right: 10px"
:openToCDB="true"
@getTextareaChange="getTextareaChange"
/>
<div
class="line-count"
id="description-scroll-right"
v-if="Object.keys(details).length > 1 && details.description.length > 1"
>
<div v-for="(num, index) in details.description.split('\n')" :key="index">{{
num.length
}}</div>
</div>
</div>
</div>
</a-modal>
<a-modal
width="500px"
:maskClosable="false"
v-model="textEntryModalVisible"
:title="textEntryModalTitle"
>
<div class="text-entry-box">
<!-- 件数包装 -->
<a-form v-if="textEntryType === 'pkgs'">
<div class="text-input">
<a-textarea
v-model="details.pkgstotal"
placeholder="请输入内容"
:auto-size="{ minRows: 6, maxRows: 9 }"
@change="pkgsTextChange"
/>
</div>
<div class="total" v-if="pkgstotalRes">{{ pkgstotalRes }}</div>
</a-form>
<!-- 毛重 -->
<a-form v-if="textEntryType === 'kgs'">
<div class="text-input">
<a-textarea
v-model="details.kgstotal"
placeholder="请输入内容"
:auto-size="{ minRows: 6, maxRows: 9 }"
@change="kgsTextChange"
/>
</div>
<div class="total" v-if="kgstotalRes">{{ kgstotalRes }} / KGS</div>
</a-form>
<!-- 尺码 -->
<a-form v-if="textEntryType === 'cbm'">
<div class="text-input">
<a-textarea
v-model="details.cbmtotal"
placeholder="请输入内容"
:auto-size="{ minRows: 6, maxRows: 9 }"
@change="cbmTextChange"
/>
</div>
<div class="total" v-if="cbmtotalRes">{{ cbmtotalRes }} / CBM</div>
</a-form>
</div>
<template #footer>
<a-button type="primary" @click="textEntryClose"></a-button>
</template>
</a-modal>
</a-collapse-panel>
</a-collapse>
</template>
<script lang="ts" setup>
import { ref, reactive, getCurrentInstance, h, watch, onMounted } from 'vue'
import { ref, getCurrentInstance, watch, onMounted } from 'vue'
import inputView from '../components/inputView.vue'
import textareaView from '../components/textareaView.vue'
import selectView from '../components/selectView.vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const props = defineProps({
details: { type: Object, default: {} },
rules: { type: Object, default: {} },
isLockBooking: { type: Boolean, default: false },
inSave: { type: Boolean, default: false },
moreStr: { type: String, default: '' },
})
const emit = defineEmits(['pkgsEnCapital', 'changeDetail'])
let { ctx: that, proxy }: any = getCurrentInstance()
const showKey = ref(['1'])
const BookingLockOrder = ref({})
const modelType = ref()
const modelTitle = ref('')
const visible = ref(false)
const labelCol = ref({
xs: { span: 24 },
sm: { span: 8 },
md: { span: 8 },
})
const wrapperCol = ref({
xs: { span: 24 },
sm: { span: 16 },
md: { span: 16 },
})
const labelColCode = ref({
xs: { span: 24 },
sm: { span: 8 },
md: { span: 10 },
})
const wrapperColCode = ref({
xs: { span: 24 },
sm: { span: 16 },
md: { span: 14 },
})
const textEntryModalVisible = ref(false)
const textEntryType: any = ref('')
const textEntryModalTitle = ref('')
const pkgstotalRes = ref(0)
const kgstotalRes = ref(0)
const cbmtotalRes = ref(0)
const id = ref()
watch(
() => props.details,
(nval) => {
if (!props.inSave) {
emit('changeDetail', {
detail: nval,
type: 'cargoInfo',
})
}
},
{ deep: true },
)
watch(
() => props.moreStr,
(nval, oval) => {
if (nval !== oval) {
let str = props.details.description
if (str.length > 0) {
str += '\n'
}
props.details.description = str + nval
}
},
)
watch(
() => route.query,
() => {
id.value = route.query.id
},
{ immediate: true },
)
onMounted(() => {
// const marksScroll = document.getElementById('marks-scroll')
// if (marksScroll) {
// marksScroll.addEventListener('scroll', () => {
// document.getElementById('marks-scroll-right').scrollTop = marksScroll.scrollTop
// })
// }
// const descriptionScroll = document.getElementById('description-scroll')
// if (descriptionScroll) {
// descriptionScroll.addEventListener('scroll', () => {
// document.getElementById('description-scroll-right').scrollTop = descriptionScroll.scrollTop
// })
// }
// const obj = {}
// that.$options.filters['dictData']('BookingLockOrder').forEach((item) => {
// obj[item.code] = true
// })
// BookingLockOrder.value = obj
setTimeout(() => {
changePkgs()
}, 2000)
})
function tabStopFun() {
return false
}
function handleOpen(type) {
modelType.value = type
if (type === 1) {
modelTitle.value = '唛头'
} else {
modelTitle.value = '货物描述'
}
visible.value = true
}
function getTextareaChange({ type, value }) {
props.details[type] = value
that.$forceUpdate()
}
function getSelectViewRes({ type, res }) {
if (type === 'goodsname') {
props.details.goodscode = res.goodsCode || ''
props.details.goodsname = res.goodsNameEN || ''
} else if (type === 'cargoid') {
props.details.cargoid = res.code || ''
if (res.code == 'R') {
props.rules['goodsname'][0].required = true
} else {
props.rules['goodsname'][0].required = false
}
} else if (['kindpkgs'].includes(type)) {
props.details.kindpkgs = res['name'] || ''
const enCapitalRes = SetTOTALNO(props.details.pkgs)
emit('pkgsEnCapital', enCapitalRes)
}
}
function SetTOTALNO(SS) {
SS = SS.toString()
const i = SS.indexOf('\n')
let num = 0
let strKind = ''
let enCapital = ''
if (i > 0) {
const slist = SS.split('\n')
for (let i = 0; i < slist.length; i += 1) {
const member = slist[i]
const strNum: any = GetStringNum(member)
if (i == 0) {
strKind = member.substring(strNum.length)
}
num = parseFloat(num).add(parseFloat(strNum))
}
if (strKind !== '') {
enCapital = strKind
} else {
strKind = props.details.kindpkgs
enCapital = ToEn(num).toUpperCase() + ' ' + strKind + ' ONLY.'
}
} else {
const strNum: any = GetStringNum(SS)
strKind = SS.substring(strNum.length)
if (strKind !== '') {
console.log(strKind)
enCapital = strKind
} else {
strKind = props.details.kindpkgs
enCapital = 'SAY:' + ToEn(strNum).toUpperCase() + ' ' + strKind + ' ONLY.'
}
}
return enCapital
}
function ToEn(a) {
// eslint-disable-next-line no-array-constructor
const arr1 = new Array('', ' thousand', ' million', ' billion')
const b = a.length
let f: any = null
let h = 0
let g = ''
const e = Math.ceil(b / 3)
const k = b - e * 3
g = ''
for (f = k; f < b; f += 3) {
++h
// eslint-disable-next-line no-undef
const num3 = f >= 0 ? a.substring(f, f + 3) : a.substring(0, k + 3)
// eslint-disable-next-line no-undef
const strEng = English(num3)
// eslint-disable-next-line eqeqeq
if (strEng != '') {
// eslint-disable-next-line eqeqeq
if (g != '') g += ' '
g += English(num3) + arr1[e - h]
}
}
return g
}
function English(a) {
// eslint-disable-next-line no-array-constructor
var arr2 = new Array(
'zero',
'ten',
'twenty',
'thirty',
'forty',
'fifty',
'sixty',
'seventy',
'eighty',
'ninety',
)
// eslint-disable-next-line no-array-constructor
var arr3 = new Array(
'zero',
'one',
'two',
'three',
'four',
'five',
'six',
'seven',
'eight',
'nine',
)
// eslint-disable-next-line no-array-constructor
var arr4 = new Array(
'ten',
'eleven',
'twelve',
'thirteen',
'fourteen',
'fifteen',
'sixteen',
'seventeen',
'eighteen',
'nineteen',
)
let strRet = ''
// eslint-disable-next-line eqeqeq
if (a.length == 3 && a.substr(0, 3) != '000') {
if (a.substr(0, 1) != '0') {
strRet += arr3[a.substr(0, 1)] + ' hundred'
if (a.substr(1, 2) != '00') strRet += ' and '
} else {
strRet += ' and '
}
a = a.substring(1)
}
if (a.length == 2) {
if (a.substr(0, 1) == '0') a = a.substring(1)
else if (a.substr(0, 1) == '1') strRet += arr4[a.substr(1, 2)]
else {
strRet += arr2[a.substr(0, 1)]
if (a.substr(1, 1) != '0') strRet += '-'
a = a.substring(1)
}
}
if (a.length == 1 && a.substr(0, 1) != '0') strRet += arr3[a.substr(0, 1)]
return strRet
}
function GetStringNum(str) {
var num = 0
if (str == null || str == '') return num
if (str.length == 0) return num
var if_find = false
var str_num = ''
for (var i = 0; i < str.length; i += 1) {
var member = str.substr(i, 1)
if (
member == '0' ||
member == '1' ||
member == '2' ||
member == '3' ||
member == '4' ||
member == '5' ||
member == '6' ||
member == '7' ||
member == '8' ||
member == '9' ||
member == '.' ||
member == '-'
) {
if (!if_find) {
str_num = str_num + member
}
} else {
if_find = true
}
}
return str_num
}
function inputChange({ type, value }) {
props.details[type] = value
if (type === 'pkgs') {
changePkgs()
}
that.$forceUpdate()
}
function changePkgs() {
const enCapitalRes = SetTOTALNO(props.details.pkgs)
emit('pkgsEnCapital', enCapitalRes)
}
function editTextEntryModel(type) {
textEntryModalVisible.value = true
textEntryType.value = type
if (type === 'pkgs') {
textEntryModalTitle.value = '件数/包装'
if (props.details.pkgstotal) {
pkgsTextChange()
} else {
pkgstotalRes.value = 0
}
} else if (type === 'kgs') {
textEntryModalTitle.value = '毛重'
if (props.details.kgstotal) {
kgsTextChange()
} else {
kgstotalRes.value = 0
}
} else if (type === 'cbm') {
textEntryModalTitle.value = '尺码'
if (props.details.cbmtotal) {
cbmTextChange()
} else {
cbmtotalRes.value = 0
}
}
}
function pkgsTextChange() {
const pkgsTexyVal = props.details.pkgstotal
const arr = pkgsTexyVal.split(/\n|\r/g)
let pkgs = 0
let kindpkgs = ''
arr.map((item, index) => {
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g)
if (regexStr && Number(regexStr[0])) {
const num1 = Number(regexStr[0])
pkgs = (pkgs * 100 + num1 * 100) / 100
}
if (!kindpkgs && regexStr && /^[a-zA-Z]+$/.test(regexStr[1])) {
kindpkgs = regexStr[1]
}
})
props.details.pkgs = parseInt(pkgs)
props.details.kindpkgs = kindpkgs
pkgstotalRes.value = parseInt(pkgs)
}
function kgsTextChange() {
const kgsTexyVal = props.details.kgstotal
const arr = kgsTexyVal.split(/\n|\r/g)
let kgs = 0
arr.map((item, index) => {
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g)
if (regexStr && Number(regexStr[0])) {
const num1 = Number(regexStr[0])
kgs = (kgs * 100 + num1 * 100) / 100
}
})
props.details.kgs = kgs
kgstotalRes.value = kgs
}
function cbmTextChange() {
const cbmTexyVal = props.details.cbmtotal
const arr = cbmTexyVal.split(/\n|\r/g)
let cbm = 0
arr.map((item, index) => {
const regexStr = item.match(/[a-zA-Z]+|[0-9]+(?:\.[0-9]+|)/g)
if (regexStr && Number(regexStr[0])) {
const num1 = Number(regexStr[0])
cbm = (cbm * 100 + num1 * 100) / 100
}
})
props.details.cbm = cbm
cbmtotalRes.value = cbm
}
function textEntryClose() {
textEntryModalVisible.value = false
textEntryModalTitle.value = ''
textEntryType.value = false
}
</script>
<style lang="less" scoped>
.copy-btn {
@ -84,8 +988,8 @@
}
</style>
<style lang="less" scoped>
@import url('../style/cargoInfo.less');
@import url('../style/mailingInfo.less');
@import url('../style/cargoInfo.less');
.cargo-info {
padding-bottom: 20px;
}

@ -1,15 +1,15 @@
<template>
<div class="more-edi" :style="{ paddingTop: '20px', paddingBottom: '10px' }">
<a-form-model ref="ediFrom" :model="details" :rules="rules" v-if="details">
<a-form ref="ediFrom" :model="details" :rules="rules" v-if="details">
<div class="normal">
<a-row :gutter="16">
<a-col :span="8">
<a-form-model-item
<a-form-item
label="发送方EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.sendCode"
name="bookingEDIExt.sendCode"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.sendCode" /> -->
<inputView
@ -17,15 +17,15 @@
:parentVal="details.bookingEDIExt.sendCode"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="接收方EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.receiveCode"
name="bookingEDIExt.receiveCode"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.receiveCode" /> -->
<inputView
@ -33,15 +33,15 @@
:parentVal="details.bookingEDIExt.receiveCode"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="EDI联系人名称"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.ediAttn"
name="bookingEDIExt.ediAttn"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.ediAttn" /> -->
<inputView
@ -49,15 +49,15 @@
:parentVal="details.bookingEDIExt.ediAttn"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="EDI联系人电话"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.ediAttnTel"
name="bookingEDIExt.ediAttnTel"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.ediAttnTel" /> -->
<inputView
@ -65,15 +65,15 @@
:parentVal="details.bookingEDIExt.ediAttnTel"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="EDI联系人邮箱"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.ediAttnMail"
name="bookingEDIExt.ediAttnMail"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.ediAttnMail" /> -->
<inputView
@ -81,15 +81,15 @@
:parentVal="details.bookingEDIExt.ediAttnMail"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="AMS收货人"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.amsConsignee"
name="bookingEDIExt.amsConsignee"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.amsConsignee" /> -->
<inputView
@ -97,15 +97,15 @@
:parentVal="details.bookingEDIExt.amsConsignee"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="AMS通知人"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.amsNotifyParty"
name="bookingEDIExt.amsNotifyParty"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.amsNotifyParty" /> -->
<inputView
@ -113,15 +113,15 @@
:parentVal="details.bookingEDIExt.amsNotifyParty"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="操作英文名称"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.opEName"
name="bookingEDIExt.opEName"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.opEName" /> -->
<inputView
@ -129,15 +129,15 @@
:parentVal="details.bookingEDIExt.opEName"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="操作电话"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.opTel"
name="bookingEDIExt.opTel"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.opTel" /> -->
<inputView
@ -145,15 +145,15 @@
:parentVal="details.bookingEDIExt.opTel"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="操作邮箱"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.opEmail"
name="bookingEDIExt.opEmail"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.opEmail" /> -->
<inputView
@ -161,15 +161,15 @@
:parentVal="details.bookingEDIExt.opEmail"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="商品名称"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.goodsName"
name="bookingEDIExt.goodsName"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.goodsName" /> -->
<inputView
@ -177,15 +177,15 @@
:parentVal="details.bookingEDIExt.goodsName"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="SOC箱"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="iscontainersoc"
name="iscontainersoc"
>
<a-select
size="small"
@ -196,15 +196,15 @@
<a-select-option value="1"> </a-select-option>
<a-select-option value="0"> </a-select-option>
</a-select>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="SCAC代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="scaccode"
name="scaccode"
>
<!-- <a-input :allowClear="true" v-model="details.scaccode" /> -->
<inputView
@ -212,15 +212,15 @@
:parentVal="details.scaccode"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="ITN编号"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="itncode"
name="itncode"
>
<!-- <a-input :allowClear="true" v-model="details.itncode" /> -->
<inputView
@ -228,15 +228,15 @@
:parentVal="details.itncode"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="订舱人说明"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.orderRemark"
name="bookingEDIExt.orderRemark"
>
<!-- <a-input v-model="details.bookingEDIExt.orderRemark" /> -->
<inputView
@ -245,15 +245,15 @@
:parentVal="details.bookingEDIExt.orderRemark"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="付款方"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="freightpayer"
name="freightpayer"
>
<!-- <a-input :allowClear="true" v-model="details.freightpayer" /> -->
<inputView
@ -261,60 +261,60 @@
:parentVal="details.freightpayer"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="第一层包装皮重"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.kingTareweight"
name="bookingEDIExt.kingTareweight"
>
<inputView
type="kingTareweight"
:parentVal="details.bookingEDIExt.kingTareweight"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item
<a-form-item
label="指定业务员"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.xmcywy"
name="bookingEDIExt.xmcywy"
>
<inputView
type="xmcywy"
:parentVal="details.bookingEDIExt.xmcywy"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col v-if="details.carrierid == 'EMC'" :span="8">
<a-form-model-item
<a-form-item
label="Name accout"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.emcNameAccount"
name="bookingEDIExt.emcNameAccount"
>
<inputView
type="emcNameAccount"
:parentVal="details.bookingEDIExt.emcNameAccount"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="23">
<a-form-model-item
<a-form-item
label="委托方"
:labelCol="{ xs: { span: 24 }, sm: { span: 3 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 21 } }"
has-feedback
prop="bookingEDIExt.weiTuoFang"
name="bookingEDIExt.weiTuoFang"
style="margin-top: 4px"
>
<a-textarea
@ -322,7 +322,7 @@
v-model="details.bookingEDIExt.weiTuoFang"
:auto-size="{ minRows: 2, maxRows: 5 }"
/>
</a-form-model-item>
</a-form-item>
</a-col>
</a-row>
</div>
@ -335,12 +335,12 @@
<div class="ex-remark-content">
<a-row :gutter="16">
<a-col :span="12">
<a-form-model-item
<a-form-item
label="辅助字段1"
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 17 } }"
has-feedback
prop="bookingEDIExt.exRemark1"
name="bookingEDIExt.exRemark1"
>
<a-textarea
size="small"
@ -348,15 +348,15 @@
v-model="details.bookingEDIExt.exRemark1"
:auto-size="{ minRows: 2, maxRows: 5 }"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="辅助字段2"
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 17 } }"
has-feedback
prop="bookingEDIExt.exRemark2"
name="bookingEDIExt.exRemark2"
>
<a-textarea
size="small"
@ -364,17 +364,17 @@
v-model="details.bookingEDIExt.exRemark2"
:auto-size="{ minRows: 2, maxRows: 5 }"
/>
</a-form-model-item>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-col :span="12">
<a-form-model-item
<a-form-item
label="辅助字段3"
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 17 } }"
has-feedback
prop="bookingEDIExt.exRemark3"
name="bookingEDIExt.exRemark3"
>
<a-textarea
size="small"
@ -382,15 +382,15 @@
v-model="details.bookingEDIExt.exRemark3"
:auto-size="{ minRows: 2, maxRows: 5 }"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="辅助字段4"
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 17 } }"
has-feedback
prop="bookingEDIExt.exRemark4"
name="bookingEDIExt.exRemark4"
>
<a-textarea
size="small"
@ -398,7 +398,7 @@
v-model="details.bookingEDIExt.exRemark4"
:auto-size="{ minRows: 2, maxRows: 5 }"
/>
</a-form-model-item>
</a-form-item>
</a-col>
</a-row>
</div>
@ -408,12 +408,12 @@
<div class="taiping">
<a-row :gutter="16">
<a-col :span="12">
<a-form-model-item
<a-form-item
label="收货人EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.consigneeEdiCode"
name="bookingEDIExt.consigneeEdiCode"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.consigneeEdiCode" /> -->
<inputView
@ -421,15 +421,15 @@
:parentVal="details.bookingEDIExt.consigneeEdiCode"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="发货人EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.shipperEdiCode"
name="bookingEDIExt.shipperEdiCode"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.shipperEdiCode" /> -->
<inputView
@ -437,15 +437,15 @@
:parentVal="details.bookingEDIExt.shipperEdiCode"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="通知方EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.notifyCdoe"
name="bookingEDIExt.notifyCdoe"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.notifyCdoe" /> -->
<inputView
@ -453,15 +453,15 @@
:parentVal="details.bookingEDIExt.notifyCdoe"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="太平销售EDI代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.salerCode"
name="bookingEDIExt.salerCode"
>
<selectView
type="salerCode"
@ -477,15 +477,15 @@
{{ sales.NAME }}
</a-select-option>
</a-select> -->
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="EMANIFEST HBL"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.emanifestHbl"
name="bookingEDIExt.emanifestHbl"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.emanifestHbl" /> -->
<inputView
@ -493,15 +493,15 @@
:parentVal="details.bookingEDIExt.emanifestHbl"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="Master Bol Indicator"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.masterBolIndicator"
name="bookingEDIExt.masterBolIndicator"
>
<selectView
type="masterBolIndicator"
@ -517,15 +517,15 @@
{{ master.NAME }}
</a-select-option>
</a-select> -->
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="S0C C0C:"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.s0CC0C"
name="bookingEDIExt.s0CC0C"
style="margin-top: 4px"
>
<a-textarea
@ -534,15 +534,15 @@
v-model="details.bookingEDIExt.s0CC0C"
:auto-size="{ minRows: 2, maxRows: 5 }"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="欧盟港口、伊朗港口、KHI"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.ckhi"
name="bookingEDIExt.ckhi"
style="margin-top: 4px"
>
<a-textarea
@ -550,49 +550,49 @@
v-model="details.bookingEDIExt.ckhi"
:auto-size="{ minRows: 2, maxRows: 5 }"
/>
</a-form-model-item>
</a-form-item>
</a-col>
</a-row>
</div>
<div class="taiping-2">
<a-row :gutter="16">
<a-col :span="12">
<a-form-model-item
<a-form-item
label="南美东"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.cncm"
name="bookingEDIExt.cncm"
>
<a-textarea
size="small"
v-model="details.bookingEDIExt.cncm"
:auto-size="{ minRows: 2, maxRows: 5 }"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="巴西线木质包装情况"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.wncm"
name="bookingEDIExt.wncm"
>
<a-textarea
size="small"
v-model="details.bookingEDIExt.wncm"
:auto-size="{ minRows: 2, maxRows: 5 }"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="ACI HBL:"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.acihbl"
name="bookingEDIExt.acihbl"
>
<!-- <a-input :allowClear="true" v-model="details.bookingEDIExt.acihbl" /> -->
<inputView
@ -600,28 +600,28 @@
:parentVal="details.bookingEDIExt.acihbl"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-model-item
<a-form-item
label="CNPT No:"
:labelCol="{ xs: { span: 24 }, sm: { span: 9 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
prop="bookingEDIExt.cnptNo"
name="bookingEDIExt.cnptNo"
>
<inputView
type="CNPTNo"
:parentVal="details.bookingEDIExt.cnptNo"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-form-item>
</a-col>
</a-row>
</div>
</template>
<!-- === 太平添加 END === -->
</a-form-model>
</a-form>
</div>
</template>
<script>

@ -1059,13 +1059,16 @@
import textareaView from '../components/textareaView.vue'
import selectView from '../components/selectView.vue'
import datePickerView from '../components/datePickerView.vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const props = defineProps({
details: { type: Object, default: {} },
rules: { type: Object, default: {} },
isLockBooking: { type: Boolean, default: false },
ishd: { type: Boolean, default: false },
inSave: { type: Boolean, default: false },
})
const emit = defineEmits(['pkgsEnCapital', 'editLineName', 'spliceMore'])
const emit = defineEmits(['pkgsEnCapital', 'editLineName', 'spliceMore', 'changeDetail'])
let { ctx: that, proxy }: any = getCurrentInstance()
const showKey = ref(['1'])
const visible = ref(false)
@ -1107,6 +1110,62 @@
const yardType = ref('')
const yardVisible = ref(false)
const visibleJW = ref(false)
const id = ref()
const shippernameInput = ref()
const consigneenameInput = ref()
const notifypartynameInput = ref()
watch(
() => props.details,
(nval) => {
if (!props.details.notifypartY2) {
props.details.notifypartY2 = ''
}
if (!props.inSave) {
emit('changeDetail', {
detail: nval,
type: 'mailingInfo',
})
}
},
{ deep: true },
)
watch(
() => route.query,
() => {
id.value = route.query.id
if (route.name === 'BookingDetail' && Object.keys(that.$refs).includes('shippernameInput')) {
shippernameInput.value.$data.value = ''
consigneenameInput.value.$data.value = ''
notifypartynameInput.value.$data.value = ''
}
},
{ immediate: true },
)
onMounted(() => {
// const shipperScroll = document.getElementById('shipper-scroll')
// if (shipperScroll) {
// shipperScroll.addEventListener('scroll', () => {
// document.getElementById('shipper-scroll-right').scrollTop = shipperScroll.scrollTop
// })
// }
// const consigneeScroll = document.getElementById('consignee-scroll')
// consigneeScroll.addEventListener('scroll', () => {
// document.getElementById('consignee-scroll-right').scrollTop = consigneeScroll.scrollTop
// })
// const notifypartyScroll = document.getElementById('notifyparty-scroll')
// notifypartyScroll.addEventListener('scroll', () => {
// document.getElementById('notifyparty-scroll-right').scrollTop = notifypartyScroll.scrollTop
// })
// const obj = {}
// this.$options.filters['dictData']('BookingLockOrder').forEach(item => {
// obj[item.code] = true
// })
// this.BookingLockOrder = obj
setTimeout(() => {
changePkgs()
}, 2000)
})
function tabStopFun() {
return false
}

@ -27,7 +27,7 @@ export default {
route: [{ required: false, message: '请选择航线操作', trigger: 'change' }],
lineManage: [{ required: false, message: '请选择航线管理', trigger: 'change' }],
dzRemark: [{ required: false, message: '请选择单证备注', trigger: 'change' }],
czRemark: [{ required: false, message: '请选择操作备注', trigger: 'change' }]
czRemark: [{ required: false, message: '请选择操作备注', trigger: 'change' }],
},
mailingRules: {
shipper: [{ required: false, message: '请输入发货人', trigger: 'submit' }],
@ -59,14 +59,14 @@ export default {
kindpkgs: [{ required: false, message: '请输入包装', trigger: 'change' }],
kgs: [{ required: false, message: '请输入毛重', trigger: 'change' }],
cbm: [{ required: false, message: '请输入尺寸', trigger: 'change' }],
blfrt: [{ required: false, message: '请选择付费方式', trigger: 'change' }]
blfrt: [{ required: false, message: '请选择付费方式', trigger: 'change' }],
},
cargoRules: {
marks: [{ required: false, message: '请输入Seal No. Marks & Nos', trigger: 'change' }],
cargoid: [{ required: false, message: '请选择货物标志', trigger: 'change' }],
hscode: [{ required: false, message: '请输入HS编码', trigger: 'change' }],
description: [{ required: false, message: '请输入包装种类与货名', trigger: 'change' }],
goodsname: [{ required: false, message: '请选择品名', trigger: 'change' }]
goodsname: [{ required: false, message: '请选择品名', trigger: 'change' }],
},
billRules: {
issuetype: [{ required: false, message: '请选择签单方式', trigger: 'change' }],
@ -90,46 +90,82 @@ export default {
dunno: [{ required: false, message: '请输入危险品编号', trigger: 'change' }],
dpage: [{ required: false, message: '请输入危险品页号', trigger: 'change' }],
dlabel: [{ required: false, message: '请输入危险品标签', trigger: 'change' }],
linkman: [{ required: false, message: '请输入危险品联系人', trigger: 'change' }]
linkman: [{ required: false, message: '请输入危险品联系人', trigger: 'change' }],
},
remarksRules: {
soremark: [{ required: false, message: '请输入订舱备注', trigger: 'change' }],
siremark: [{ required: false, message: '请输入截单备注', trigger: 'change' }]
siremark: [{ required: false, message: '请输入截单备注', trigger: 'change' }],
},
ediRules: {
'bookingEDIExt.sendCode': [{ required: false, message: '请输入发送方EDI代码', trigger: 'change' }],
'bookingEDIExt.receiveCode': [{ required: false, message: '请输入接收方EDI代码', trigger: 'change' }],
'bookingEDIExt.ediAttn': [{ required: false, message: '请输入EDI联系人名称', trigger: 'change' }],
'bookingEDIExt.ediAttnTel': [{ required: false, message: '请输入EDI联系人电话', trigger: 'change' }],
'bookingEDIExt.ediAttnMail': [{ required: false, message: '请输入EDI联系人邮箱', trigger: 'change' }],
'bookingEDIExt.amsConsignee': [{ required: false, message: '请输入AMS收货人', trigger: 'change' }],
'bookingEDIExt.amsNotifyParty': [{ required: false, message: '请输入AMS通知人', trigger: 'change' }],
'bookingEDIExt.opEName': [{ required: false, message: '请输入操作英文名称', trigger: 'change' }],
'bookingEDIExt.sendCode': [
{ required: false, message: '请输入发送方EDI代码', trigger: 'change' },
],
'bookingEDIExt.receiveCode': [
{ required: false, message: '请输入接收方EDI代码', trigger: 'change' },
],
'bookingEDIExt.ediAttn': [
{ required: false, message: '请输入EDI联系人名称', trigger: 'change' },
],
'bookingEDIExt.ediAttnTel': [
{ required: false, message: '请输入EDI联系人电话', trigger: 'change' },
],
'bookingEDIExt.ediAttnMail': [
{ required: false, message: '请输入EDI联系人邮箱', trigger: 'change' },
],
'bookingEDIExt.amsConsignee': [
{ required: false, message: '请输入AMS收货人', trigger: 'change' },
],
'bookingEDIExt.amsNotifyParty': [
{ required: false, message: '请输入AMS通知人', trigger: 'change' },
],
'bookingEDIExt.opEName': [
{ required: false, message: '请输入操作英文名称', trigger: 'change' },
],
'bookingEDIExt.opTel': [{ required: false, message: '请输入操作电话', trigger: 'change' }],
'bookingEDIExt.opEmail': [{ required: false, message: '请输入操作邮箱', trigger: 'change' }],
'bookingEDIExt.goodsName': [{ required: false, message: '请输入商品名称', trigger: 'change' }],
iscontainersoc: [{ required: false, message: '请输入SOC箱', trigger: 'change' }],
scaccode: [{ required: false, message: '请输入SCAC代码', trigger: 'change' }],
itncode: [{ required: false, message: '请输入ITN编号', trigger: 'change' }],
'bookingEDIExt.orderRemark': [{ required: false, message: '请输入订舱人说明', trigger: 'change' }],
'bookingEDIExt.orderRemark': [
{ required: false, message: '请输入订舱人说明', trigger: 'change' },
],
freightpayer: [{ required: false, message: '请输入付款方', trigger: 'change' }],
'bookingEDIExt.kingTareweight': [{ required: false, message: '请输入第一层包装皮重', trigger: 'change' }],
'bookingEDIExt.kingTareweight': [
{ required: false, message: '请输入第一层包装皮重', trigger: 'change' },
],
'bookingEDIExt.weiTuoFang': [{ required: false, message: '请输入委托方', trigger: 'change' }],
'bookingEDIExt.exRemark1': [{ required: false, message: '请输入辅助字段1', trigger: 'change' }],
'bookingEDIExt.exRemark2': [{ required: false, message: '请输入辅助字段2', trigger: 'change' }],
'bookingEDIExt.exRemark3': [{ required: false, message: '请输入辅助字段3', trigger: 'change' }],
'bookingEDIExt.exRemark4': [{ required: false, message: '请输入辅助字段4', trigger: 'change' }],
'bookingEDIExt.consigneeEdiCode': [{ required: false, message: '请输入收货人EDI代码', trigger: 'change' }],
'bookingEDIExt.shipperEdiCode': [{ required: false, message: '请输入发货人EDI代码', trigger: 'change' }],
'bookingEDIExt.notifyCdoe': [{ required: false, message: '请输入通知方EDI代码', trigger: 'change' }],
'bookingEDIExt.salerCode': [{ required: false, message: '请输入太平销售EDI代码', trigger: 'change' }],
'bookingEDIExt.emanifestHbl': [{ required: false, message: '请输入EMANIFEST HBL', trigger: 'change' }],
'bookingEDIExt.masterBolIndicator': [{ required: false, message: '请输入Master Bol Indicator', trigger: 'change' }],
'bookingEDIExt.consigneeEdiCode': [
{ required: false, message: '请输入收货人EDI代码', trigger: 'change' },
],
'bookingEDIExt.shipperEdiCode': [
{ required: false, message: '请输入发货人EDI代码', trigger: 'change' },
],
'bookingEDIExt.notifyCdoe': [
{ required: false, message: '请输入通知方EDI代码', trigger: 'change' },
],
'bookingEDIExt.salerCode': [
{ required: false, message: '请输入太平销售EDI代码', trigger: 'change' },
],
'bookingEDIExt.emanifestHbl': [
{ required: false, message: '请输入EMANIFEST HBL', trigger: 'change' },
],
'bookingEDIExt.masterBolIndicator': [
{ required: false, message: '请输入Master Bol Indicator', trigger: 'change' },
],
'bookingEDIExt.s0CC0C': [{ required: false, message: '请输入S0C C0C', trigger: 'change' }],
'bookingEDIExt.ckhi': [{ required: false, message: '请输入欧盟港口、伊朗港口、KHI', trigger: 'change' }],
'bookingEDIExt.ckhi': [
{ required: false, message: '请输入欧盟港口、伊朗港口、KHI', trigger: 'change' },
],
'bookingEDIExt.cncm': [{ required: false, message: '请输入南美东', trigger: 'change' }],
'bookingEDIExt.wncm': [{ required: false, message: '请输入巴西线木质包装情况', trigger: 'change' }],
'bookingEDIExt.acihbl': [{ required: false, message: '请输入ACI HBL', trigger: 'change' }]
'bookingEDIExt.wncm': [
{ required: false, message: '请输入巴西线木质包装情况', trigger: 'change' },
],
'bookingEDIExt.acihbl': [{ required: false, message: '请输入ACI HBL', trigger: 'change' }],
},
tableRules: {
ctnall: { required: false, title: '箱型', message: '请选择箱型', trigger: 'change' },
@ -142,7 +178,7 @@ export default {
cbm: { required: false, title: '尺码', message: '请选择尺码', trigger: 'change' },
tareweight: { required: false, title: '箱皮重', message: '请选择箱皮重', trigger: 'change' },
weightype: { required: false, title: '称重方式', message: '请选择称重方式', trigger: 'change' },
weighkgs: { required: false, title: '称重重量', message: '请选择称重重量', trigger: 'change' }
weighkgs: { required: false, title: '称重重量', message: '请选择称重重量', trigger: 'change' },
},
preRules: {
ctn: { required: false, title: '箱型', message: '请选择箱型', trigger: 'change' },
@ -151,6 +187,6 @@ export default {
pkgs: { required: false, title: '件数', message: '请选择件数', trigger: 'change' },
kindpkgs: { required: false, title: '包装', message: '请选择包装', trigger: 'change' },
kgs: { required: false, title: '重量', message: '请选择重量', trigger: 'change' },
cbm: { required: false, title: '尺码', message: '请选择尺码', trigger: 'change' }
}
cbm: { required: false, title: '尺码', message: '请选择尺码', trigger: 'change' },
},
}

@ -126,7 +126,7 @@
line-height: 36px !important;
}
/deep/ .ant-form-item-control{
height:36px !important;
// height:36px !important;
line-height: 36px !important;
}
.line{

@ -315,7 +315,7 @@
list-style: none;
position: relative;
text-align: left;
padding: 29px 18px 0 0;
padding: 29px 0 0 0;
.parents-tabs-top {
position: absolute;
top: 0;

@ -1757,7 +1757,7 @@
const AdvancedQueryData = ref<FilterRules>({ logicalOperator: 'and', conditions: [], groups: [] })
const fields = ref<Field[]>([])
const permissionId = ref<String>('')
const ConditionalList = ref<String>('')
const ConditionalList: Ref<any> = ref()
// ========
onBeforeRouteLeave((to, from, next) => {
appStore.setbookingGridOptions(gridOptions)
@ -1817,13 +1817,16 @@
onMounted(() => {
onresize()
})
// ========
// ====================================================
//
function FnOpenAdvancedQuery() {
AdvancedQueryVisible.value = true
}
//
function FnCancelAdvancedQuery() {
AdvancedQueryVisible.value = false
}
//
async function FnAdvancedQuery() {
let Api = (data) => {
let Obj: any = {}
@ -1863,7 +1866,10 @@
}
return Obj
}
ConditionalList.value = JSON.stringify(Api(AdvancedQueryData.value).ConditionalList)
ConditionalList.value = {
ConditionalList: Api(AdvancedQueryData.value).ConditionalList,
}
let ApiData = {
permissionId: permissionId.value,
@ -1872,10 +1878,165 @@
const res: API.DataResult = await UpdateUserQuerySet(ApiData)
if (res.succeeded) {
console.log(res)
getList(searchData.value)
getList(searchData.value, false, 'normal', true)
FnCancelAdvancedQuery()
}
}
//
function getList(queryParam = {}, isInit = false, isAdd = 'normal', isAdv = false) {
gridOptions.loading = true
const { currentPage, pageSize } = gridOptions.pagerConfig
let query = {
pageCondition: {
pageIndex: currentPage,
pageSize: pageSize,
sortConditions: [],
},
queryCondition: [],
}
Object.keys(formRes.value).forEach((item) => {
console.log({
FieldName: item,
FieldValue: formRes.value[item],
ConditionalType: 1,
})
query.queryCondition.push({
FieldName: item,
FieldValue: formRes.value[item],
ConditionalType: 1,
})
})
console.log(queryParam, formRes.value)
// Object.keys(query).map((item, index) => {
// if (!query[item]) {
// delete query[item]
// }
// })
// if (query.queryCondition.MBLNO && query.queryCondition.MBLNO.split(/|,/).length > 0) {
// const arr = searchData.value.MBLNO.split(/|,/)
// query.queryCondition.MBLNO = arr.toString()
// }
// // const firstFlag = appStore.getfirstFlag
// // if (firstFlag || nowFirst.value) {
// // query.queryCondition.firstFlag = true
// // }
// if (
// (!searchData.value.multisort || searchData.value.multisort.length === 0) &&
// (!queryParam.multisort || queryParam.multisort.length === 0) &&
// tableOrderLabel.value &&
// tableOrderType.value
// ) {
// query.queryCondition.multisort = [
// {
// sortField: tableOrderLabel.value,
// descSort: tableOrderType.value === 'desc',
// },
// ]
// }
// if (searchData.value.multisort && searchData.value.multisort.length > 0) {
// query.queryCondition.multisort = searchData.value.multisort
// }
if (isAdv) {
query.queryCondition.push(ConditionalList.value)
}
PageDataByBooking({
pageCondition: query.pageCondition,
queryCondition: JSON.stringify(query.queryCondition),
})
.then((res) => {
if (res.succeeded) {
let newBookingList = {}
if (query.queryCondition.PageNo !== 1) {
newBookingList = appStore.getbookingList
}
const _data = res.data.map((item, index) => {
item.index = (currentPage - 1) * pageSize + index
const bookstatus = [
{ staCode: 'sta_cangdan', isChecked: false },
{ staCode: 'sta_haifang', isChecked: false },
{ staCode: 'sta_zhuangzai', isChecked: false },
{ staCode: 'sta_mafang', isChecked: false },
{ staCode: 'sta_zhuangchuan', isChecked: false },
{ staCode: 'sta_atd', isChecked: false },
]
if (item.bookstatus.length > 0) {
bookstatus.map((book, bindex) => {
item.bookstatus.map((item, index) => {
if (item.staCode === book.staCode) {
bookstatus[bindex] = item
bookstatus[bindex].isChecked = true
}
})
})
}
if (item.bsstatusname) {
if (appStore.getstatusDIct) {
appStore.getstatusDIct.forEach((ite) => {
if (ite.name == item.bsstatusname) {
item.bsstatusnameColor = ite.remark
}
})
}
}
item.bookstatus = bookstatus
item.refshYzitemLoad = false
item.webDataLoad = false
item.atdLoading = false
item.serviceLoad = false
item.rowDzMark = false
item.rowCzMark = false
item.rowCustno = false
item.rowSqxs = false
item.rowPono = false
item.czmarkLoading = false
item.custnoLoading = false
item.dzmarkLoading = false
item.sqxsLoading = false
item.ponoLoading = false
if (!item.shenQingXiangShi) {
item.shenQingXiangShi = ''
}
let hasGoods = 0
if (item.goodsStatusList) {
item.goodsStatusList.map((gitem, gindex) => {
if (gitem.finishTime || gitem.remark) {
hasGoods++
}
})
}
item.hasGoods = hasGoods
newBookingList[item.id] = item
return item
})
gridOptions.pagerConfig.columns = JSON.parse(JSON.stringify(initData.columns))
gridOptions.data = [..._data]
xGrid.value.reloadData(_data).then(() => {
gridOptions.loading = false
console.log(gridOptions.loading)
})
gridOptions.pagerConfig.total = res.data.totalCount
appStore.setbookingList(newBookingList)
if (tableOrderType.value) {
xGrid.value.sort(tableOrderLabel.value, tableOrderType.value)
} else {
xGrid.value.clearSort()
}
// that.$forceUpdate()
} else {
gridOptions.data = [...[]]
gridOptions.loading = false
// that.$forceUpdate()
}
ResetType.value = true
appStore.setfirstFlag(false)
console.log(gridOptions.loading)
})
.catch((err) => {
console.log(err)
})
}
// ====================================================
function getListByone(listId, listIndex) {
PageDataByBooking({ id: listId }).then((res) => {
const item = res.data[0]
@ -2323,142 +2484,7 @@
gridOptions.data = []
getList(queryParam)
}
function getList(queryParam = {}, isInit = false, isAdd = 'normal') {
gridOptions.loading = true
const { currentPage, pageSize } = gridOptions.pagerConfig
const query = {
pageCondition: {
pageIndex: currentPage,
pageSize: pageSize,
sortConditions: [],
},
queryCondition: [],
}
Object.keys(query).map((item, index) => {
if (!query[item]) {
delete query[item]
}
})
if (query.queryCondition.MBLNO && query.queryCondition.MBLNO.split(/|,/).length > 0) {
const arr = searchData.value.MBLNO.split(/|,/)
query.queryCondition.MBLNO = arr.toString()
}
// const firstFlag = appStore.getfirstFlag
// if (firstFlag || nowFirst.value) {
// query.queryCondition.firstFlag = true
// }
if (
(!searchData.value.multisort || searchData.value.multisort.length === 0) &&
(!queryParam.multisort || queryParam.multisort.length === 0) &&
tableOrderLabel.value &&
tableOrderType.value
) {
query.queryCondition.multisort = [
{
sortField: tableOrderLabel.value,
descSort: tableOrderType.value === 'desc',
},
]
}
if (searchData.value.multisort && searchData.value.multisort.length > 0) {
query.queryCondition.multisort = searchData.value.multisort
}
PageDataByBooking({
...query,
ConditionalList: ConditionalList.value,
})
.then((res) => {
if (res.succeeded) {
let newBookingList = {}
if (query.queryCondition.PageNo !== 1) {
newBookingList = appStore.getbookingList
}
const _data = res.data.map((item, index) => {
item.index = (currentPage - 1) * pageSize + index
const bookstatus = [
{ staCode: 'sta_cangdan', isChecked: false },
{ staCode: 'sta_haifang', isChecked: false },
{ staCode: 'sta_zhuangzai', isChecked: false },
{ staCode: 'sta_mafang', isChecked: false },
{ staCode: 'sta_zhuangchuan', isChecked: false },
{ staCode: 'sta_atd', isChecked: false },
]
if (item.bookstatus.length > 0) {
bookstatus.map((book, bindex) => {
item.bookstatus.map((item, index) => {
if (item.staCode === book.staCode) {
bookstatus[bindex] = item
bookstatus[bindex].isChecked = true
}
})
})
}
if (item.bsstatusname) {
if (appStore.getstatusDIct) {
appStore.getstatusDIct.forEach((ite) => {
if (ite.name == item.bsstatusname) {
item.bsstatusnameColor = ite.remark
}
})
}
}
item.bookstatus = bookstatus
item.refshYzitemLoad = false
item.webDataLoad = false
item.atdLoading = false
item.serviceLoad = false
item.rowDzMark = false
item.rowCzMark = false
item.rowCustno = false
item.rowSqxs = false
item.rowPono = false
item.czmarkLoading = false
item.custnoLoading = false
item.dzmarkLoading = false
item.sqxsLoading = false
item.ponoLoading = false
if (!item.shenQingXiangShi) {
item.shenQingXiangShi = ''
}
let hasGoods = 0
if (item.goodsStatusList) {
item.goodsStatusList.map((gitem, gindex) => {
if (gitem.finishTime || gitem.remark) {
hasGoods++
}
})
}
item.hasGoods = hasGoods
newBookingList[item.id] = item
return item
})
gridOptions.pagerConfig.columns = JSON.parse(JSON.stringify(initData.columns))
gridOptions.data = [..._data]
xGrid.value.reloadData(_data).then(() => {
gridOptions.loading = false
console.log(gridOptions.loading)
})
gridOptions.pagerConfig.total = res.data.totalCount
appStore.setbookingList(newBookingList)
if (tableOrderType.value) {
xGrid.value.sort(tableOrderLabel.value, tableOrderType.value)
} else {
xGrid.value.clearSort()
}
// that.$forceUpdate()
} else {
gridOptions.data = [...[]]
gridOptions.loading = false
// that.$forceUpdate()
}
ResetType.value = true
appStore.setfirstFlag(false)
console.log(gridOptions.loading)
})
.catch((err) => {
console.log(err)
})
}
function getCompleteListFun({ form, value }) {
let query = {}
if (

Loading…
Cancel
Save