|
@@ -18,18 +18,18 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="messageType" style="width: 108px">
|
|
|
- <el-select v-model="formData.messageType" size="default" placeholder="报文类型">
|
|
|
+ <el-select v-model="formData.messageType" size="default" placeholder="报文类型" @change="typeChange">
|
|
|
<el-option v-for="{ value, label } in messageTypeOptions" :key="value" :value="value" :label="label" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="messageEmit" style="width: 128px">
|
|
|
- <el-select v-model="formData.messageEmit" size="default" placeholder="报文发出方">
|
|
|
- <el-option v-for="{ value, label } in messageLoactionOptions" :key="value" :value="value" :label="label" />
|
|
|
+ <el-select :disabled="emitFlag" v-model="formData.messageEmit" size="default" placeholder="报文发出方">
|
|
|
+ <el-option v-for="{ value, label } in messageLoactionOptions" :key="value" :value="value" :label="label" :disabled="value == 'IMP_SZ'" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="messageReceive" style="width: 128px">
|
|
|
- <el-select v-model="formData.messageReceive" size="default" placeholder="报文接收方">
|
|
|
- <el-option v-for="{ value, label } in messageLoactionOptions" :key="value" :value="value" :label="label" />
|
|
|
+ <el-select :disabled="receiveFlag" v-model="formData.messageReceive" size="default" placeholder="报文接收方">
|
|
|
+ <el-option v-for="{ value, label } in messageLoactionOptions" :key="value" :value="value" :label="label" :disabled="value == 'IMP_SZ'" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="waybillNO">
|
|
@@ -84,6 +84,8 @@ const formData = reactive({
|
|
|
waybillNO: '',
|
|
|
})
|
|
|
|
|
|
+const [emitFlag,receiveFlag] = [ref(false),ref(true)]
|
|
|
+
|
|
|
watchEffect(() => {
|
|
|
if (!formData.startDate || !formData.endDate) {
|
|
|
return
|
|
@@ -166,6 +168,19 @@ const resetForm = () => {
|
|
|
formRef.value?.resetFields()
|
|
|
}
|
|
|
|
|
|
+const typeChange = (val) => {
|
|
|
+ const nkey = '' + val
|
|
|
+ emitFlag.value = !emitFlag.value
|
|
|
+ receiveFlag.value = !receiveFlag.value
|
|
|
+ if (nkey == 'IMP_ARRIVAL') {
|
|
|
+ formData.messageEmit = 'IMP_NJ'
|
|
|
+ formData.messageReceive = 'IMP_SZ'
|
|
|
+ } else {
|
|
|
+ formData.messageEmit = 'IMP_SZ'
|
|
|
+ formData.messageReceive = 'IMP_NJ'
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
const loading = ref(false)
|
|
|
const page = ref(1)
|
|
|
const noMore = ref(true)
|