优化
This commit is contained in:
@ -144,7 +144,7 @@
|
||||
</template>
|
||||
<div style="position: relative;">
|
||||
<a-textarea style="width:95%;" v-model:value="item.pointDelyName" :disabled="isDisable" readonly placeholder="请选择交割点" :auto-size="{ minRows: 1, maxRows: 5 }"/>
|
||||
<a-button :icon="h(SearchOutlined)" class="iconStyle" @click="onSearchDownLoad('dely', idx)" />
|
||||
<a-button v-if="!isDisable" :icon="h(SearchOutlined)" class="iconStyle" @click="onSearchDownLoad('dely', idx)" />
|
||||
<!-- <a-input-search v-model:value="item.pointDelyName" :disabled="isDisable" placeholder="请选择交割点" readonly @search="onSearchDownLoad('dely', idx)"/> -->
|
||||
</div>
|
||||
</a-form-item>
|
||||
@ -237,7 +237,6 @@
|
||||
const curIdx = ref(null)
|
||||
const { notification } = useMessage();
|
||||
const { t } = useI18n();
|
||||
const hasDel = ref(false)
|
||||
const formState = reactive({
|
||||
approCode: 'WTJ',
|
||||
typeCode: 'PP',
|
||||
@ -444,9 +443,6 @@
|
||||
})
|
||||
}
|
||||
const deleteUpLoad = () => {
|
||||
if (dataListPoint.value[dataListPoint.value.length -1].id) {
|
||||
hasDel.value = true
|
||||
}
|
||||
if (dataListPoint.value.length == 1) return
|
||||
dataListPoint.value.pop()
|
||||
}
|
||||
@ -500,6 +496,7 @@
|
||||
dataListPoint.value[curIdx.value].pointDelyName = nameList.join(',')
|
||||
dataListPoint.value[curIdx.value].lngContractPurPngPointSalesList = val || []
|
||||
dataListPoint.value[curIdx.value].lngContractPurPngPointSalesList.forEach(v => {
|
||||
v.id = ''
|
||||
v.pointDelyCode = v.code
|
||||
})
|
||||
}
|
||||
@ -535,23 +532,18 @@
|
||||
arr[i].qtyM3Month = Number(arr[i].qtyM3Month)*10000
|
||||
arr[i].qtyM3Day = Number(arr[i].qtyM3Day)*10000
|
||||
}
|
||||
let arr1 = []
|
||||
for(let i=0; i<dataListPoint.value.length; i++) {
|
||||
dataListPoint.value[i].hasDel = hasDel.value
|
||||
if (!dataListPoint.value[i].pointUpCode || !dataListPoint.value[i].transSign || !dataListPoint.value[i].lngContractPurPngPointSalesList.length) {
|
||||
message.warn('请完善交割点必选项')
|
||||
return
|
||||
}
|
||||
arr1.concat(dataListPoint.value[i].lngContractPurPngPointSalesList || [])
|
||||
dataListPoint.value[i].lngContractPurPngPointSalesList.forEach(v => {
|
||||
v.hasDel = hasDel.value
|
||||
v.pointUpCode = dataListPoint.value[i].pointUpCode
|
||||
v.transSign = dataListPoint.value[i].transSign
|
||||
})
|
||||
}
|
||||
let arr1 = []
|
||||
dataListAppro.value.forEach(v=>{
|
||||
v.approId = ''
|
||||
arr1.concat(v.lngContractPurPngPointSalesList || [])
|
||||
})
|
||||
let newArr = arr1.map(v=>v.pointDelyCode)
|
||||
let codeList = dataListPoint.value.map(v =>v.pointUpCode)
|
||||
const isRepeat=codeList.some((item,index,arr)=>arr.indexOf(item)!=index);
|
||||
|
||||
Reference in New Issue
Block a user