|
|
|
@ -15,6 +15,7 @@
|
|
|
|
|
|
|
|
|
|
<vxe-table
|
|
|
|
|
border
|
|
|
|
|
show-footer
|
|
|
|
|
show-overflow
|
|
|
|
|
keep-source
|
|
|
|
|
ref="xTable"
|
|
|
|
@ -25,6 +26,7 @@
|
|
|
|
|
:loading="doGoods.loading"
|
|
|
|
|
:mouse-config="{ selected: true }"
|
|
|
|
|
:checkbox-config="{ range: true }"
|
|
|
|
|
:footer-method="footerMethod"
|
|
|
|
|
:data="doGoods.tableData"
|
|
|
|
|
:keyboard-config="doGoods.tableKeyboardConfig"
|
|
|
|
|
:edit-config="{ trigger: 'dblclick', mode: 'cell' }"
|
|
|
|
@ -113,43 +115,43 @@
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
|
|
|
|
<vxe-column field="areaname" title="库位" width="100" />
|
|
|
|
|
<!-- <vxe-column-->
|
|
|
|
|
<!-- field="areaname"-->
|
|
|
|
|
<!-- title="库位"-->
|
|
|
|
|
<!-- width="120"-->
|
|
|
|
|
<!-- :edit-render="{ autofocus: '.vxe-input--inner' }"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <template #edit="{ row }">-->
|
|
|
|
|
<!-- <vxe-select v-model="row.areaname" clearable @change="areaChange(row)">-->
|
|
|
|
|
<!-- <vxe-option-->
|
|
|
|
|
<!-- v-for="item in props.areaList"-->
|
|
|
|
|
<!-- :key="item.id"-->
|
|
|
|
|
<!-- :value="item.areaname"-->
|
|
|
|
|
<!-- :label="item.areaname"-->
|
|
|
|
|
<!-- />-->
|
|
|
|
|
<!-- </vxe-select>-->
|
|
|
|
|
<!-- <!– <a-select–>-->
|
|
|
|
|
<!-- <!– ref="select"–>-->
|
|
|
|
|
<!-- <!– showSearch–>-->
|
|
|
|
|
<!-- <!– v-model:value="row.areaname"–>-->
|
|
|
|
|
<!-- <!– style="width: 100px"–>-->
|
|
|
|
|
<!-- <!– :dropdownMatchSelectWidth="false"–>-->
|
|
|
|
|
<!-- <!– :filterOption="false"–>-->
|
|
|
|
|
<!-- <!– @change="–>-->
|
|
|
|
|
<!-- <!– (e, opt) => {–>-->
|
|
|
|
|
<!-- <!– areaHandle(e, opt, row)–>-->
|
|
|
|
|
<!-- <!– }–>-->
|
|
|
|
|
<!-- <!– "–>-->
|
|
|
|
|
<!-- <!– >–>-->
|
|
|
|
|
<!-- <!– <a-select-option–>-->
|
|
|
|
|
<!-- <!– v-for="item in props.areaList"–>-->
|
|
|
|
|
<!-- <!– :key="`${item.id}`"–>-->
|
|
|
|
|
<!-- <!– :value="item.areaname"–>-->
|
|
|
|
|
<!-- <!– >{{ item.areaname }}</a-select-option–>-->
|
|
|
|
|
<!-- <!– >–>-->
|
|
|
|
|
<!-- <!– </a-select>–>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </vxe-column>-->
|
|
|
|
|
<!-- <vxe-column-->
|
|
|
|
|
<!-- field="areaname"-->
|
|
|
|
|
<!-- title="库位"-->
|
|
|
|
|
<!-- width="120"-->
|
|
|
|
|
<!-- :edit-render="{ autofocus: '.vxe-input--inner' }"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <template #edit="{ row }">-->
|
|
|
|
|
<!-- <vxe-select v-model="row.areaname" clearable @change="areaChange(row)">-->
|
|
|
|
|
<!-- <vxe-option-->
|
|
|
|
|
<!-- v-for="item in props.areaList"-->
|
|
|
|
|
<!-- :key="item.id"-->
|
|
|
|
|
<!-- :value="item.areaname"-->
|
|
|
|
|
<!-- :label="item.areaname"-->
|
|
|
|
|
<!-- />-->
|
|
|
|
|
<!-- </vxe-select>-->
|
|
|
|
|
<!-- <!– <a-select–>-->
|
|
|
|
|
<!-- <!– ref="select"–>-->
|
|
|
|
|
<!-- <!– showSearch–>-->
|
|
|
|
|
<!-- <!– v-model:value="row.areaname"–>-->
|
|
|
|
|
<!-- <!– style="width: 100px"–>-->
|
|
|
|
|
<!-- <!– :dropdownMatchSelectWidth="false"–>-->
|
|
|
|
|
<!-- <!– :filterOption="false"–>-->
|
|
|
|
|
<!-- <!– @change="–>-->
|
|
|
|
|
<!-- <!– (e, opt) => {–>-->
|
|
|
|
|
<!-- <!– areaHandle(e, opt, row)–>-->
|
|
|
|
|
<!-- <!– }–>-->
|
|
|
|
|
<!-- <!– "–>-->
|
|
|
|
|
<!-- <!– >–>-->
|
|
|
|
|
<!-- <!– <a-select-option–>-->
|
|
|
|
|
<!-- <!– v-for="item in props.areaList"–>-->
|
|
|
|
|
<!-- <!– :key="`${item.id}`"–>-->
|
|
|
|
|
<!-- <!– :value="item.areaname"–>-->
|
|
|
|
|
<!-- <!– >{{ item.areaname }}</a-select-option–>-->
|
|
|
|
|
<!-- <!– >–>-->
|
|
|
|
|
<!-- <!– </a-select>–>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </vxe-column>-->
|
|
|
|
|
<vxe-column
|
|
|
|
|
field="pkgs"
|
|
|
|
|
title="件数"
|
|
|
|
@ -295,7 +297,7 @@
|
|
|
|
|
import { propTypes } from '/@/utils/propTypes'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
import { getWmsFeeList } from '/@/views/wms/common/api'
|
|
|
|
|
import { getWmsOutDoGoodslist, delWmsOutDoGoods} from "/@/api/wms/wmsoutdo";
|
|
|
|
|
import { getWmsOutDoGoodslist, delWmsOutDoGoods } from '/@/api/wms/wmsoutdo'
|
|
|
|
|
const { notification, createConfirm, createMessage } = useMessage()
|
|
|
|
|
const goodsFilterData = ref([])
|
|
|
|
|
const areaList = ref([])
|
|
|
|
@ -374,6 +376,7 @@
|
|
|
|
|
return `${rowIndex + 1}`
|
|
|
|
|
},
|
|
|
|
|
} as VxeTablePropTypes.SeqConfig)
|
|
|
|
|
|
|
|
|
|
async function selectSearch(value: string) {
|
|
|
|
|
if (stringIsNull(value)) {
|
|
|
|
|
} else {
|
|
|
|
@ -389,6 +392,7 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// async function querySelect(query: string) {
|
|
|
|
|
// console.log(query)
|
|
|
|
|
// if (stringIsNull(query.value)) {
|
|
|
|
@ -560,6 +564,30 @@
|
|
|
|
|
}
|
|
|
|
|
doGoods.loading = false
|
|
|
|
|
}
|
|
|
|
|
const sumNum = (list: any[], field: string) => {
|
|
|
|
|
let count = 0
|
|
|
|
|
list.forEach((item) => {
|
|
|
|
|
count += Number(item[field])
|
|
|
|
|
})
|
|
|
|
|
return count
|
|
|
|
|
}
|
|
|
|
|
function footerMethod({ columns, data }) {
|
|
|
|
|
const footerData = [
|
|
|
|
|
columns.map((column, _columnIndex) => {
|
|
|
|
|
if (_columnIndex === 0) {
|
|
|
|
|
return '合计'
|
|
|
|
|
}
|
|
|
|
|
// if (['pkgs'].includes(column.field)) {
|
|
|
|
|
// return sumNum(data, 'pkgs')
|
|
|
|
|
// }
|
|
|
|
|
if (['pkgs', 'storageunitcount', 'minpkgs', 'kgs', 'netweight'].includes(column.field)) {
|
|
|
|
|
return sumNum(data, column.field)
|
|
|
|
|
}
|
|
|
|
|
return null
|
|
|
|
|
}),
|
|
|
|
|
]
|
|
|
|
|
return footerData
|
|
|
|
|
}
|
|
|
|
|
// await initData()
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|