Browse Source

修复

master_hella_20240701
赵雪冰 8 months ago
parent
commit
b22a0ebac9
  1. 6
      src/api/wms/productreceiptRequestMain/index.ts
  2. 16
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  3. 46
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

6
src/api/wms/productreceiptRequestMain/index.ts

@ -138,3 +138,9 @@ export const agree = (id) => {
export const handle = (id) => {
return request.put({ url: '/wms/productreceipt-request-main/handle?id=' + id })
}
// 创建标签
export const productCreateLabel = async (data: ProductreceiptRequestMainVO) => {
return await request.post({ url: `/wms/productreceipt-request-main/productCreateLabel`, data })
}

16
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -124,7 +124,7 @@
<ImportForm ref="importFormRef" url="/wms/productreceipt-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :extend="'predict'"/>
<!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccessLabel" />
</template>
<script setup lang="ts">
@ -200,6 +200,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit']
row['secondPackQty'] = val[0]['packQty']
}else if(formField == 'packUnit'){
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
}else if (formField == 'itemCode') {
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
@ -614,11 +617,11 @@ const searchFormClick = (searchData) => {
//
const submitFormLabel = async (formType, data) => {
try {
detatableData.tableList.forEach(async (item) => {
console.log("aaaaa",data);
data.subList=detatableData.tableList
console.log("bbbbb",data);
//
item.packUnit = null
item.inOfOut = 'in'
await PackageApi.createPackageLabel(item).then(res => {
await ProductreceiptRequestMainApi.productCreateLabel(data).then(res => {
isCreateLabel.value = true
message.success('创建标签成功')
}).catch(err => {
@ -626,7 +629,6 @@ const submitFormLabel = async (formType, data) => {
console.log(err)
message.error('创建标签失败')
})
})
} finally {
formLabelRef.value.formLoading = false
formLabelRef.value.dialogVisible = false
@ -717,7 +719,7 @@ const labelPrint = async (row) => {
}
// --
const searchTableSuccess1 = async (formField, searchField, val, formRef, type, row) => {
const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => {
console.log('批量打印',val)
// let rows:any = []
// val.forEach(item=>{

46
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -1781,10 +1781,51 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
field: 'packUnit',
sort: 'custom',
table: {
width: 180
width: 150,
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageByProductreceipt,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
disabled: true
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageByProductreceipt,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
},
{
@ -1806,7 +1847,6 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
{
label: '包装规格2',
field: 'secondPackUnit',
isTable: true,
sort: 'custom',
table: {
width: 150,

Loading…
Cancel
Save