|
@@ -34,23 +34,23 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
- <a-form-item label="台账编号:" name="ledgerCode">
|
|
|
- <a-select v-model:value="formData.ledgerCode" :disabled="isView" placeholder="请选择台账编号" :options="tzOptions" show-search allow-clear option-filter-prop="label" @change="onChangTz"/>
|
|
|
+ <a-form-item label="绑定类型:" name="bdlx">
|
|
|
+ <a-select v-model:value="formData.bdlx" :disabled="isView" placeholder="请选择绑定类型" :options="bdlxOptions" show-search allow-clear option-filter-prop="label" @change="onChangeBdlx"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
- <a-form-item label="进出标志:" name="jcbz">
|
|
|
- <a-select v-model:value="formData.jcbz" :disabled="isView" placeholder="请选择进出标志" :options="jcbzOptions" show-search allow-clear option-filter-prop="label"/>
|
|
|
+ <a-form-item label="关联核注清单编号:" name="glhzqdbh">
|
|
|
+ <a-select v-model:value="formData.glhzqdbh" :disabled="isView || !formData.bdlx || formData.bdlx == 2" placeholder="请选择关联核注清单编号" :options="hzqdOptions" show-search allow-clear option-filter-prop="label" @change="onChangHzqd"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
- <a-form-item label="绑定类型:" name="bdlx">
|
|
|
- <a-select v-model:value="formData.bdlx" :disabled="isView" placeholder="请选择绑定类型" :options="bdlxOptions" show-search allow-clear option-filter-prop="label" @change="onChangeBdlx"/>
|
|
|
+ <a-form-item label="台账编号:" name="ledgerCode">
|
|
|
+ <a-input v-model:value="formData.ledgerCode" :disabled="true" placeholder="请选择关联核注清单编号" allow-clear/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
- <a-form-item label="关联核注清单编号:" name="glhzqdbh">
|
|
|
- <a-select v-model:value="formData.glhzqdbh" :disabled="isView || !showHfdbt" placeholder="请输入关联核注清单编号" :options="hzqdOptions" show-search allow-clear option-filter-prop="label" @change="onChangHzqd"/>
|
|
|
+ <a-form-item label="进出标志:" name="jcbz">
|
|
|
+ <a-select v-model:value="formData.jcbz" :disabled="isView" placeholder="请选择进出标志" :options="jcbzOptions" show-search allow-clear option-filter-prop="label"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
@@ -172,8 +172,8 @@
|
|
|
</a-form>
|
|
|
</a-collapse-panel>
|
|
|
<a-collapse-panel key="2" header="核放单表体" v-if="showHfdbt">
|
|
|
- <a-button type="primary" @click="onBodyReset" v-if="!isView" style="margin-bottom: 20px;">重置</a-button>
|
|
|
- <a-form ref="bodyFormRef" :model="bodyData" :rules="bodyRules" style="margin-bottom: 20px;">
|
|
|
+<!-- <a-button type="primary" @click="onBodyReset" v-if="!isView" style="margin-bottom: 20px;">重置</a-button>-->
|
|
|
+ <a-form ref="bodyFormRef" :model="bodyData" style="margin-bottom: 20px;">
|
|
|
<a-row :gutter="16">
|
|
|
<a-col :span="8">
|
|
|
<a-form-item label="关联商品序号:" name="productId">
|
|
@@ -217,14 +217,14 @@
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
- <template v-if="!isView">
|
|
|
- <a-button type="primary" style="margin-right: 8px;" v-if="!(bodyData.id || bodyData.__index)" @click="onBodyAdd">插入</a-button>
|
|
|
- <a-button type="primary" style="margin-right: 8px;" v-else @click="onBodyEdit">保存</a-button>
|
|
|
- <xn-batch-delete
|
|
|
- :selectedRowKeys="bodySelectedRowKeys"
|
|
|
- @batchDelete="deleteBatchBody"
|
|
|
- />
|
|
|
- </template>
|
|
|
+<!-- <template v-if="!isView">-->
|
|
|
+<!-- <a-button type="primary" style="margin-right: 8px;" v-if="!(bodyData.id || bodyData.__index)" @click="onBodyAdd">插入</a-button>-->
|
|
|
+<!-- <a-button type="primary" style="margin-right: 8px;" v-else @click="onBodyEdit">保存</a-button>-->
|
|
|
+<!-- <xn-batch-delete-->
|
|
|
+<!-- :selectedRowKeys="bodySelectedRowKeys"-->
|
|
|
+<!-- @batchDelete="deleteBatchBody"-->
|
|
|
+<!-- />-->
|
|
|
+<!-- </template>-->
|
|
|
<a-table
|
|
|
style="margin-top: 10px"
|
|
|
bordered
|
|
@@ -236,13 +236,14 @@
|
|
|
>
|
|
|
<template #bodyCell="{ column, record, index }">
|
|
|
<template v-if="column.dataIndex === 'action'">
|
|
|
- <template v-if="isView">
|
|
|
- <a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">查看</a-button>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">编辑</a-button>
|
|
|
- <a-button type="link" danger size="small" @click="onBodyDel(index)">删除</a-button>
|
|
|
- </template>
|
|
|
+ <a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">查看</a-button>
|
|
|
+<!-- <template v-if="isView">-->
|
|
|
+<!-- <a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">查看</a-button>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- <template v-else>-->
|
|
|
+<!-- <a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">编辑</a-button>-->
|
|
|
+<!-- <a-button type="link" danger size="small" @click="onBodyDel(index)">删除</a-button>-->
|
|
|
+<!-- </template>-->
|
|
|
</template>
|
|
|
</template>
|
|
|
</a-table>
|
|
@@ -286,6 +287,9 @@
|
|
|
:row-selection="relationOptions.rowSelection"
|
|
|
>
|
|
|
<template #bodyCell="{ column, record, index }">
|
|
|
+ <template v-if="column.dataIndex === 'dzType'">
|
|
|
+ {{ $TOOL.dictTypeData('gldzlx', record.dzType) }}
|
|
|
+ </template>
|
|
|
<template v-if="column.dataIndex === 'action'">
|
|
|
<template v-if="isView">
|
|
|
<a-button type="link" primary size="small" @click="onRelationReset(), relationData = cloneDeep(record)">查看</a-button>
|
|
@@ -382,7 +386,6 @@
|
|
|
const bdlxOptions = ref([])
|
|
|
const dzTypeOptions = ref([])
|
|
|
const hzqdOptions = ref([])
|
|
|
- const tzOptions = ref([])
|
|
|
const bgdhOptions = ref([])
|
|
|
const jzxhOptions = ref([])
|
|
|
const statusOptions = ref([])
|
|
@@ -513,7 +516,7 @@
|
|
|
bodyList.value = res.productList
|
|
|
relationList.value = res.dzList
|
|
|
fileList.value = res.attachmentList
|
|
|
- if (formData.value.bdlx == 1) {
|
|
|
+ if (formData.value.bdlx == 1 || formData.value.bdlx == 3) {
|
|
|
showGldz.value = false
|
|
|
showHfdbt.value = true
|
|
|
} else if (formData.value.bdlx == 2) {
|
|
@@ -523,11 +526,6 @@
|
|
|
if (type) {
|
|
|
formData.value.sblx = type
|
|
|
}
|
|
|
- if (formData.value.ledgerCode) {
|
|
|
- qySecondlineHzdTzApi.qySecondlineHzdTzHgHzdCodeByTzCode({tzCode: formData.value.ledgerCode}).then(res => {
|
|
|
- hzqdOptions.value = res.map(v => ({label: v, value: v}))
|
|
|
- })
|
|
|
- }
|
|
|
if (formData.value.hfdBgCode) {
|
|
|
qySecondlineHfdApi.qysecondlinehfdlistGetHfdBgInfoByBgCode({hfdBgCode: formData.value.hfdBgCode}).then(res => {
|
|
|
jzxhOptions.value = res.jzxList.map(v => {
|
|
@@ -547,8 +545,8 @@
|
|
|
formData.value.sbqyshxydm = userInfo.companyNumber
|
|
|
formData.value.sblx = type
|
|
|
}
|
|
|
- qySecondlineHzdTzApi.qySecondlineHzdTzTzCodeByCondition().then(res => {
|
|
|
- tzOptions.value = res.map(v => ({label: v, value: v}))
|
|
|
+ qySecondlineHfdApi.qySecondlineHfdGetHzListByCondition().then(res => {
|
|
|
+ hzqdOptions.value = res.map(v => Object.assign(v, {label: v.hgHzdCode, value: v.hgHzdCode}))
|
|
|
})
|
|
|
qySecondlineHfdApi.qysecondlinehfdlistGetBgCodeList().then(res => {
|
|
|
bgdhOptions.value = res.map(v => ({label: v, value: v}))
|
|
@@ -570,7 +568,6 @@
|
|
|
// 默认要校验的
|
|
|
const formRules = ref({
|
|
|
hfdLx: [required('请选择核放单类型')],
|
|
|
- ledgerCode: [required('请选择台账编号')],
|
|
|
jcbz: [required('请选择进出口标志')],
|
|
|
bdlx: [required('请选择绑定类型')],
|
|
|
sblx: [required('请选择申报类型')],
|
|
@@ -586,11 +583,11 @@
|
|
|
jzxh: [required('请选择集装箱号')],
|
|
|
})
|
|
|
watch(() => formData.value.bdlx, (n) => {
|
|
|
- if (n == 1) {
|
|
|
- formRules.value.glhzqdbh = [required('请输入关联核注单编号')]
|
|
|
- } else {
|
|
|
+ if (n == 2) {
|
|
|
delete formRules.value.glhzqdbh
|
|
|
formRef.value.clearValidate('glhzqdbh')
|
|
|
+ } else {
|
|
|
+ formRules.value.glhzqdbh = [required('请输入关联核注单编号')]
|
|
|
}
|
|
|
})
|
|
|
// 默认要校验的
|
|
@@ -835,25 +832,15 @@
|
|
|
return flag
|
|
|
})
|
|
|
}
|
|
|
- const onChangTz = (val) => {
|
|
|
- if (val) {
|
|
|
- qySecondlineHzdTzApi.qySecondlineHzdTzHgHzdCodeByTzCode({tzCode: val}).then(res => {
|
|
|
- hzqdOptions.value = res.map(v => ({label: v, value: v}))
|
|
|
- })
|
|
|
- } else {
|
|
|
- formData.value.glhzqdbh = ''
|
|
|
- hzqdOptions.value = []
|
|
|
- bodyList.value = []
|
|
|
- onBodyReset()
|
|
|
- }
|
|
|
- }
|
|
|
- const onChangHzqd = (val) => {
|
|
|
+ const onChangHzqd = (val, obj) => {
|
|
|
if (val) {
|
|
|
+ formData.value.tzCode = obj.tzCode
|
|
|
qySecondlineHzdTzApi.qySecondlineHzdTzGetProductByHgHzdCode({hgHzCode: val}).then(res => {
|
|
|
bodyList.value = res
|
|
|
onBodyReset()
|
|
|
})
|
|
|
} else {
|
|
|
+ formData.value.tzCode = ''
|
|
|
bodyList.value = []
|
|
|
onBodyReset()
|
|
|
}
|
|
@@ -870,6 +857,7 @@
|
|
|
showGldz.value = true
|
|
|
showHfdbt.value = false
|
|
|
formData.value.glhzqdbh = ''
|
|
|
+ formData.value.ledgerCode = ''
|
|
|
} else {
|
|
|
showGldz.value = false
|
|
|
showHfdbt.value = false
|