|
|
|
@ -285,6 +285,8 @@
|
|
|
|
|
const list = ref<any>([])
|
|
|
|
|
const moreTList = ref<any>([])
|
|
|
|
|
const moreData = ref<any>([[]])
|
|
|
|
|
// 选中的包装下拉数据
|
|
|
|
|
const mainPkgs = ref([])
|
|
|
|
|
// 定义表格所有列
|
|
|
|
|
const columns = [
|
|
|
|
|
{
|
|
|
|
@ -364,6 +366,8 @@
|
|
|
|
|
// 下拉框数据,可以同步或者异步返回(异步需要process返回)
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
|
const res = (await GetPackageSelectList({ queryKey: query }))?.data
|
|
|
|
|
console.log(res)
|
|
|
|
|
mainPkgs.value = res
|
|
|
|
|
const dict = res.map((res) => {
|
|
|
|
|
return res.packageName
|
|
|
|
|
})
|
|
|
|
@ -599,11 +603,11 @@
|
|
|
|
|
{
|
|
|
|
|
title: '包装',
|
|
|
|
|
width: 120,
|
|
|
|
|
data: 'kindPkgs',
|
|
|
|
|
data: 'kindPkgsName',
|
|
|
|
|
type: 'dropdown',
|
|
|
|
|
// 下拉框数据,可以同步或者异步返回(异步需要process返回)
|
|
|
|
|
source: async (query, process) => {
|
|
|
|
|
const res = await GetPackageSelectList({ querykey: query })?.data
|
|
|
|
|
const res = (await GetPackageSelectList({ querykey: query }))?.data
|
|
|
|
|
const dict = res.map((res) => {
|
|
|
|
|
return res.packageName
|
|
|
|
|
})
|
|
|
|
@ -1612,7 +1616,7 @@
|
|
|
|
|
// 如果通过复制或者填写校验出现错误,清空输入框
|
|
|
|
|
afterValidate: function (isValid, value, row, prop, source) {
|
|
|
|
|
if (!isValid) {
|
|
|
|
|
hotTb.value.hotInstance.setDataAtRowProp(row, prop, '')
|
|
|
|
|
hotmain.value.hotInstance.setDataAtRowProp(row, prop, '')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
columns: columns,
|
|
|
|
@ -1641,15 +1645,7 @@
|
|
|
|
|
list.value[changes[0][0]]['tareWeight'] = dict?.ctnWeight
|
|
|
|
|
}
|
|
|
|
|
if (changes[0][1] === 'kindPkgsName') {
|
|
|
|
|
const res = kindPkgsDict.value.length
|
|
|
|
|
? kindPkgsDict.value
|
|
|
|
|
: (await GetPackageSelectList())?.data
|
|
|
|
|
if (!kindPkgsDict.value.length) {
|
|
|
|
|
kindPkgsDict.value.splice(0)
|
|
|
|
|
res.forEach((e) => {
|
|
|
|
|
kindPkgsDict.value.push(e)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const res = mainPkgs.value
|
|
|
|
|
const item = res.filter((item) => {
|
|
|
|
|
return item.packageName === changes[0][3]
|
|
|
|
|
})
|
|
|
|
@ -1658,9 +1654,7 @@
|
|
|
|
|
list.value[changes[0][0]]['kindPkgsName'] = dict?.packageName
|
|
|
|
|
}
|
|
|
|
|
if (changes[0][1] === 'weightTypeName') {
|
|
|
|
|
const res = weightTypeDict.value.length
|
|
|
|
|
? weightTypeDict.value
|
|
|
|
|
: (await getDictDropDown({ code: 'weight_type' }))?.data
|
|
|
|
|
const res = await getDictOption('weight_type')
|
|
|
|
|
if (!weightTypeDict.value.length) {
|
|
|
|
|
res.forEach((e) => {
|
|
|
|
|
weightTypeDict.value.push(e)
|
|
|
|
|