diff --git a/src/api/wms/productreceiptRecordMain/index.ts b/src/api/wms/productreceiptRecordMain/index.ts index e3dd420d9..d7637d4d0 100644 --- a/src/api/wms/productreceiptRecordMain/index.ts +++ b/src/api/wms/productreceiptRecordMain/index.ts @@ -126,3 +126,8 @@ export const createPutawayRequest = async (number:string) => { export const createInspectRequest = async (number:string) => { return await request.post({ url: `/wms/productreceipt-record-main/createInspectRequest?number=`+number }) } + +//制品收货记录子执行回收操作 +export const handleRecoveryProductreceiptRecord = async (data: ProductreceiptRecordMainVO) => { + return await request.put({ url: `/wms/productreceipt-record-main/handleRecovery`, data }) +} diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index d2136a0be..8256576c8 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -78,14 +78,14 @@ - -
+
-
+
-
+
+ :prefix-icon="iconLock" show-password type="password" @keyup.enter="passwordEnter" style="height: 42px;" /> @@ -173,6 +173,14 @@ // verify.value.show() // } // } + const passwordEnter = ()=>{ + if(!needCode.value){ + handleLogin() + return + }else{ + getCode() + } + } function getCode() { if(!needCode.value){ return diff --git a/src/views/qms/inspectionJob/index.vue b/src/views/qms/inspectionJob/index.vue index a4d7aaa94..16c5c260d 100644 --- a/src/views/qms/inspectionJob/index.vue +++ b/src/views/qms/inspectionJob/index.vue @@ -238,6 +238,14 @@ const isShowMainButton = (row, val) => { } } +const isShowMainButton3 = (row) => { + if (row.asnNumber) { + return false + } else { + return true + } +} + // 根据状态返回该按钮是否显示 const isShowMainButton2 = (row, val) => { if (val.indexOf(row.isStaging) > -1) { @@ -283,7 +291,9 @@ const butttondata = (row) => { hasPermi: 'qms:inspection-job-main:execute' }), // 发布 defaultButtons.mainListPackageBtn(null), // 包装 - defaultButtons.mainListPlanCheckQualityReportBtn({}) // 查看质检报告 + defaultButtons.mainListPlanCheckQualityReportBtn({ + hide: isShowMainButton3(row) + }) // 查看质检报告 ] } const listTableRef = ref() diff --git a/src/views/qms/inspectionQ1/index.vue b/src/views/qms/inspectionQ1/index.vue index 2d2dbde68..6092df882 100644 --- a/src/views/qms/inspectionQ1/index.vue +++ b/src/views/qms/inspectionQ1/index.vue @@ -74,12 +74,15 @@ import download from '@/utils/download' import { Q1, Q1Rules } from './inspectionQ1.data' import * as Q1Api from '@/api/qms/inspectionQ1' +import * as ItembasicApi from '@/api/wms/itembasic' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as StdcostpriceApi from '@/api/wms/stdcostprice' import { formatDate } from '@/utils/formatTime' +import * as CustomeritemApi from '@/api/wms/customeritem' +import * as CustomerApi from '@/api/wms/customer' import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() @@ -97,30 +100,64 @@ const tableColumns = ref(Q1.allSchemas.tableColumns) // 查询页面返回 const priceObj = ref() const searchTableSuccess = (formField, searchField, val, formRef) => { - nextTick(async () => { + nextTick(async () => { const setV = {} - if (formField == 'customerCode') { - setV['itemCode'] = '' - } + if (formField == 'itemCode') { + setV['customerCode'] = '' + setV['customerName'] = '' + setV['itemName'] = '' + setV['standardCostPrice'] = '' + setV['qty'] = '' + setV['claimAmount'] = '' + setV['uom'] = val[0]['customerUom'] - console.log(333,val[0].code) - const params = { - by: "ASC", - filters: [{column: "itemCode", action: "==", value: val[0].itemCode}], + CustomeritemApi.getCustomerItemListByCodes({ + itemCodes: val[0].itemCode, + customerCode: '' + }).then((res) => { + if (res?.length > 0) { + formRef.formModel.customerCode = res[0].customerCode + formRef.formModel.customerName = res[0].customerName + Q1.allSchemas.formSchema.forEach((item) => { + if (item.field == 'customerCode') { + item.componentProps.options = res + } + }) + } + }) + const paramsItembasic = { + by: 'ASC', + filters: [{ column: 'code', action: '==', value: val[0].itemCode }], + pageNo: 1, + pageSize: 500, + sort: '' + } + paramsItembasic.isSearch = true + ItembasicApi.getItembasicPage(paramsItembasic).then((res) => { + if (res.list?.length > 0) { + priceObj.value = res.list[0] + formRef.setValues({ + itemName: priceObj.value.name + }) + } + }) + + const paramsStdcostprice = { + by: 'ASC', + filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode }], pageNo: 1, pageSize: 500, - sort: "" + sort: '' } - params.isSearch = true - StdcostpriceApi.getStdcostpricePage(params).then((res) => { + paramsStdcostprice.isSearch = true + StdcostpriceApi.getStdcostpricePage(paramsStdcostprice).then((res) => { if (res.list?.length > 0) { priceObj.value = res.list[0] formRef.setValues({ - claimAmount: (parseFloat(formRef.formModel.qty) * parseFloat(priceObj.value.price)).toFixed(6) + standardCostPrice: priceObj.value.price }) } - }) } setV[formField] = val[0][searchField] @@ -128,10 +165,28 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { }) } -const onChange =(field,e)=>{ +const onChange = (field, e) => { if (field == 'qty') { - basicFormRef.value.formRef.formModel.claimAmount = (parseFloat( basicFormRef.value.formRef.formModel.qty) * parseFloat( priceObj.value.price)).toFixed(6) -} + basicFormRef.value.formRef.formModel.claimAmount = ( + parseFloat(basicFormRef.value.formRef.formModel.qty) * parseFloat(basicFormRef.value.formRef.formModel.standardCostPrice) + ).toFixed(6) + } + if (field == 'customerCode') { + basicFormRef.value.formRef.formModel.customerName = '' + const paramsCustomer = { + by: 'ASC', + filters: [{ column: 'code', action: '==', value: basicFormRef.value.formRef.formModel.customerCode }], + pageNo: 1, + pageSize: 500, + sort: '' + } + paramsCustomer.isSearch = true + CustomerApi.getCustomerPage(paramsCustomer).then((res) => { + if (res.list?.length > 0) { + basicFormRef.value.formRef.formModel.customerName = res.list[0].name + } + }) + } } // 字段设置 更新主列表字段 diff --git a/src/views/qms/inspectionQ1/inspectionQ1.data.ts b/src/views/qms/inspectionQ1/inspectionQ1.data.ts index dd3461b55..7d9524317 100644 --- a/src/views/qms/inspectionQ1/inspectionQ1.data.ts +++ b/src/views/qms/inspectionQ1/inspectionQ1.data.ts @@ -15,16 +15,16 @@ const userStore = useUserStore() // 表单校验 export const Q1Rules = reactive({ - customerCode: [required], - costCode: [required], - itemCode: [required], - qty: [required], - code: [required], - priority: [required], - claimAmount: [required], - claimReason: [required], - claimTime: [required], - handleTime: [required] + itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }], + customerCode: [{ required: true, message: '请选择客户代码', trigger: 'change' }], + qty: [{ required: true, message: '请输入数量', trigger: 'change' }], + claimAmount: [{ required: true, message: '请输入索赔金额', trigger: 'change' }], + code: [{ required: true, message: '请选择缺陷代码', trigger: 'change' }], + priority: [{ required: true, message: '请选择优先级', trigger: 'change' }], + costCode: [{ required: true, message: '请选择选择成本中心代码', trigger: 'change' }], + claimTime: [{ required: true, message: '请选择选择索赔日期', trigger: 'change' }], + handleTime: [{ required: true, message: '请选择选择处理时间', trigger: 'change' }], + claimReason: [{ required: true, message: '请选择选择索赔原因', trigger: 'change' }] }) export const Q1 = useCrudSchemas( @@ -40,62 +40,6 @@ export const Q1 = useCrudSchemas( fixed: 'left' } }, - { - label: '状态', - field: 'status', - sort: 'custom', - dictType: DICT_TYPE.PUBLISHE_STATUS, - dictClass: 'string', - isForm: false, - isSearch: false, - tableForm: { - type: 'Select', - disabled: true - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '客户代码', - field: 'customerCode', - sort: 'custom', - table: { - width: 150 - }, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - enterSearch: true, - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择客户代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '客户信息', // 查询弹窗标题 - searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 - searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法 - searchCondition: [ - { - key: 'available', - value: 'TRUE', - isMainValue: false - } - ], - verificationParams: [ - { - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true - } - ] // 失去焦点校验参数 - } - }, - isSearch: true - }, { label: '物料代码', field: 'itemCode', @@ -119,12 +63,6 @@ export const Q1 = useCrudSchemas( key: 'available', value: 'TRUE', isMainValue: false - }, - { - key: 'customerCode', - value: 'customerCode', - message: '请填写客户代码!', - isMainValue: true } ], verificationParams: [ @@ -141,76 +79,107 @@ export const Q1 = useCrudSchemas( } }, { - label: '数量', - field: 'qty', + label: '物料名称', + field: 'itemName', sort: 'custom', - isTable: true, + dictClass: 'string', isSearch: false, - table: { - width: 150 + isTable: true, + tableForm: { + disabled: true }, form: { - component: 'InputNumber', componentProps: { - min: 0, - precision: 2 + disabled: true } } }, { - label: '单位', - field: 'uom', + label: '客户代码', + field: 'customerCode', sort: 'custom', - dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: false, isTable: true, tableForm: { - type: 'Select', disabled: true }, form: { + component: 'Select', componentProps: { - disabled: true + options: [], + optionsAlias: { + labelField: 'customerCode', + valueField: 'customerCode' + }, + filterable: true } } }, { - label: '编码', - field: 'code', + label: '客户名称', + field: 'customerName', sort: 'custom', - dictType: DICT_TYPE.QMS_Q1_CODE, dictClass: 'string', isSearch: false, isTable: true, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isTable: true, + isSearch: false, table: { - width: 180 + width: 150 }, - tableForm: { - type: 'Select' + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2 + } } }, { - label: '优先级', - field: 'priority', + label: '单位', + field: 'uom', sort: 'custom', - dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY, + dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: false, - isTable: false, + isTable: true, tableForm: { - type: 'Select' + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } } }, { - label: '负责用户', - field: 'responUser', + label: '标准成本价格', + field: 'standardCostPrice', sort: 'custom', isSearch: false, - isForm: false, + table: { + width: 150 + }, form: { + component: 'InputNumber', componentProps: { - value: userStore.getUser.nickname, + min: 0, + precision: 6, disabled: true } } @@ -232,6 +201,33 @@ export const Q1 = useCrudSchemas( } } }, + { + label: '缺陷编码', + field: 'code', + sort: 'custom', + dictType: DICT_TYPE.QMS_Q1_CODE, + dictClass: 'string', + isSearch: false, + isTable: true, + table: { + width: 180 + }, + tableForm: { + type: 'Select' + } + }, + { + label: '优先级', + field: 'priority', + sort: 'custom', + dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY, + dictClass: 'string', + isSearch: false, + isTable: false, + tableForm: { + type: 'Select' + } + }, { label: '成本中心代码', @@ -303,6 +299,19 @@ export const Q1 = useCrudSchemas( } } }, + { + label: '负责用户', + field: 'responUser', + sort: 'custom', + isSearch: false, + isForm: true, + form: { + componentProps: { + value: userStore.getUser.nickname, + disabled: true + } + } + }, { label: '处理时间', field: 'handleTime', @@ -325,6 +334,24 @@ export const Q1 = useCrudSchemas( } } }, + { + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.PUBLISHE_STATUS, + dictClass: 'string', + isForm: false, + isSearch: false, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, { label: '描述', field: 'desc', @@ -392,8 +419,17 @@ export const Q1 = useCrudSchemas( valueFormat: 'YYYY-MM-DD HH:mm:ss', type: 'daterange', defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - }, + } + } + }, + { + label: '创建者', + field: 'creator', + table: { + width: 130 }, + isForm: false, + isTable: true }, { label: '操作', diff --git a/src/views/qms/inspectionQ2/index.vue b/src/views/qms/inspectionQ2/index.vue index fd8aa94b0..13e5fc996 100644 --- a/src/views/qms/inspectionQ2/index.vue +++ b/src/views/qms/inspectionQ2/index.vue @@ -55,6 +55,7 @@ :apiCreate="Q2Api.createQ2" @searchTableSuccess="searchTableSuccess" :isBusiness="false" + @onChange="onChange" /> @@ -77,7 +78,11 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' +import * as StdcostpriceApi from '@/api/wms/stdcostprice' import { formatDate } from '@/utils/formatTime' +import * as SupplieritemApi from '@/api/wms/supplieritem' +import * as SupplierApi from '@/api/wms/supplier' +import * as ItembasicApi from '@/api/wms/itembasic' import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() @@ -93,37 +98,126 @@ routeName.value = route.name const tableColumns = ref(Q2.allSchemas.tableColumns) // 查询页面返回 +const priceObj = ref() const searchTableSuccess = (formField, searchField, val, formRef) => { - nextTick(() => { + nextTick(async () => { const setV = {} if (formField == 'supplierCode') { - setV['itemCode'] = '' + const supplierParams = { + by: 'ASC', + filters: [{ column: 'code', action: '==', value: val[0].supplierCode }], + pageNo: 1, + pageSize: 500, + sort: '' + } + supplierParams.isSearch = true + SupplierApi.getSupplierPage(supplierParams).then((res) => { + if (res.list?.length > 0) { + formRef.setValues({ + supplierName: res.list[0].name + }) + } + }) } if (formField == 'itemCode') { - setV['uom'] = val[0]['supplierUom'] - } - // if (formField == 'q1Number') { - // console.log(123) - // setV['q1Number'] = val[0]['number'] - // } - if (formField == 'purchaseReceiptNumber') { - setV['wmsQty'] = val[0]['qty'] - } - if (formField == 'q1Number') { - //Q1通知单号 - let list = [] - val.forEach((item) => { - list.push(item[searchField]) + setV['SupplierCode'] = '' + setV['SupplierName'] = '' + setV['itemName'] = '' + setV['standardCostPrice'] = '' + setV['qty'] = '' + setV['claimAmount'] = '' + + setV['uom'] = val[0].supplierUom + const supplieritemParams = { + by: 'ASC', + filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode}], + pageNo: 1, + pageSize: 500, + sort: '' + } + supplieritemParams.isSearch = true + SupplieritemApi.getSupplieritemPage(supplieritemParams).then((res) => { + if (res.list?.length > 0) { + formRef.formModel.supplierCode = res.list[0].supplierCode + formRef.formModel.supplierName = res.list[0].supplierName + Q2.allSchemas.formSchema.forEach((item) => { + if (item.field == 'supplierCode') { + item.componentProps.options = res.list + } + }) + } + }) + const itembasicParams = { + by: 'ASC', + filters: [{ column: 'code', action: '==', value: val[0].itemCode }], + pageNo: 1, + pageSize: 500, + sort: '' + } + itembasicParams.isSearch = true + ItembasicApi.getItembasicPage(itembasicParams).then((res) => { + if (res.list?.length > 0) { + formRef.setValues({ + itemName: res.list[0].name + }) + } + }) + + const params2 = { + by: 'ASC', + filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode }], + pageNo: 1, + pageSize: 500, + sort: '' + } + params2.isSearch = true + StdcostpriceApi.getStdcostpricePage(params2).then((res) => { + if (res.list?.length > 0) { + priceObj.value = res.list[0] + formRef.setValues({ + standardCostPrice: priceObj.value.price + }) + } }) - setV[formField] = list.join(',') - formRef.setValues(setV) - } else { - setV[formField] = val[0][searchField] - formRef.setValues(setV) } + setV[formField] = val[0][searchField] + formRef.setValues(setV) }) } +const onChange = (field, e) => { + if (field == 'qty') { + basicFormRef.value.formRef.formModel.claimAmount = ( + parseFloat(basicFormRef.value.formRef.formModel.qty) * parseFloat(basicFormRef.value.formRef.formModel.standardCostPrice) + ).toFixed(6) + basicFormRef.value.formRef.formModel.summaryAmount = ( + parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) + ).toFixed(6) + } + if (field == 'otherclaimAmount') { + basicFormRef.value.formRef.formModel.summaryAmount = ( + parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) + + ).toFixed(6) + } + if (field == 'supplierCode') { + basicFormRef.value.formRef.formModel.supplierName = '' + const paramsCustomer = { + by: 'ASC', + filters: [{ column: 'code', action: '==', value: basicFormRef.value.formRef.formModel.supplierCode }], + pageNo: 1, + pageSize: 500, + sort: '' + } + paramsCustomer.isSearch = true + SupplierApi.getSupplierPage(paramsCustomer).then((res) => { + if (res.list?.length > 0) { + basicFormRef.value.formRef.formModel.supplierName = res.list[0].name + } + }) + } +} + // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val diff --git a/src/views/qms/inspectionQ2/inspectionQ2.data.ts b/src/views/qms/inspectionQ2/inspectionQ2.data.ts index 2e2f6a883..342e3f3c9 100644 --- a/src/views/qms/inspectionQ2/inspectionQ2.data.ts +++ b/src/views/qms/inspectionQ2/inspectionQ2.data.ts @@ -49,70 +49,14 @@ export const Q2 = useCrudSchemas( fixed: 'left' } }, - - { - label: '状态', - field: 'status', - sort: 'custom', - dictType: DICT_TYPE.PUBLISHE_STATUS, - dictClass: 'string', - isForm: false, - isSearch: false, - tableForm: { - type: 'Select', - disabled: true - }, - form: { - componentProps: { - disabled: true - } - } - }, - { - label: '供应商代码', - field: 'supplierCode', - sort: 'custom', - isSearch: true, - table: { - width: 175 - }, - form: { - componentProps: { - enterSearch: true, - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择供应商', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '供应商信息', // 查询弹窗标题 - searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 - searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 - searchCondition: [ - { - key: 'available', - value: 'TRUE', - isMainValue: false - } - ], - verificationParams: [ - { - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true - } - ] // 失去焦点校验参数 - } - } - }, { label: '物料代码', field: 'itemCode', sort: 'custom', - isSearch: true, table: { - width: 190 + width: 150 }, + isSearch: true, form: { // labelMessage: '信息提示说明!!!', componentProps: { @@ -124,12 +68,6 @@ export const Q2 = useCrudSchemas( searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 searchCondition: [ - { - key: 'supplierCode', - value: 'supplierCode', - message: '请填写供应商代码!', - isMainValue: true - }, { key: 'available', value: 'TRUE', @@ -150,32 +88,51 @@ export const Q2 = useCrudSchemas( } }, { - label: '数量', - field: 'qty', + label: '物料名称', + field: 'itemName', sort: 'custom', + dictClass: 'string', + isSearch: false, isTable: true, + tableForm: { + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + dictClass: 'string', isSearch: false, - table: { - width: 150 + isTable: true, + tableForm: { + disabled: true }, form: { - component: 'InputNumber', + component: 'Select', componentProps: { - min: 0, - precision: 2 + options: [], + optionsAlias: { + labelField: 'supplierCode', + valueField: 'supplierCode' + }, + filterable: true } } }, { - label: '单位', - field: 'uom', + label: '供应商名称', + field: 'supplierName', sort: 'custom', - dictType: DICT_TYPE.UOM, dictClass: 'string', isSearch: false, isTable: true, tableForm: { - type: 'Select', disabled: true }, form: { @@ -188,7 +145,7 @@ export const Q2 = useCrudSchemas( label: '采购收货单号', field: 'purchaseReceiptNumber', sort: 'custom', - isTable: false, + isTable: true, table: { width: 180 }, @@ -228,19 +185,99 @@ export const Q2 = useCrudSchemas( } } }, + { + label: '索赔日期', + field: 'claimTime', + isTable: true, + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, { - label: '采购收货数量', - field: 'wmsQty', + label: '数量', + field: 'qty', sort: 'custom', + isTable: true, isSearch: false, - isForm: false, + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2 + } + } + }, + { + label: '单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '标准成本价格', + field: 'standardCostPrice', + sort: 'custom', + isSearch: false, + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + disabled: true + } + } + }, + { + label: '索赔金额', + field: 'claimAmount', + sort: 'custom', isTable: false, - isDetail: false + isSearch: false, + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 2 + } + } }, - { - label: '编码', + label: '缺陷编码', field: 'code', sort: 'custom', dictType: DICT_TYPE.QMS_Q2_CODE, @@ -254,7 +291,6 @@ export const Q2 = useCrudSchemas( type: 'Select' } }, - { label: '优先级', field: 'priority', @@ -268,26 +304,38 @@ export const Q2 = useCrudSchemas( } }, { - label: '负责用户', - field: 'responUser', + label: '其他索赔描述', + field: 'otherClaimDesc', sort: 'custom', isSearch: false, - isForm: true, table: { - width: 120 + width: '150' + }, + form: { + component: 'Input', + componentProps: {} + } + }, + { + label: '其他索赔金额', + field: 'otherclaimAmount', + sort: 'custom', + isSearch: false, + table: { + width: 150 }, form: { + component: 'InputNumber', componentProps: { - value: userStore.getUser.nickname, - disabled: true + min: 0, + precision: 6, } } }, { - label: '索赔金额', - field: 'claimAmount', + label: '汇总金额', + field: 'summaryAmount', sort: 'custom', - isTable: false, isSearch: false, table: { width: 150 @@ -296,7 +344,8 @@ export const Q2 = useCrudSchemas( component: 'InputNumber', componentProps: { min: 0, - precision: 2 + precision: 6, + disabled: true } } }, @@ -337,49 +386,6 @@ export const Q2 = useCrudSchemas( } } }, - - { - label: '索赔日期', - field: 'claimTime', - isTable: true, - table: { - width: 180 - }, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' - } - } - }, - { - label: '处理时间', - field: 'handleTime', - isTable: false, - table: { - width: 180 - }, - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' - } - } - }, { label: 'Q1通知单号', field: 'q1Number', @@ -424,6 +430,62 @@ export const Q2 = useCrudSchemas( }, isSearch: true }, + { + label: '负责用户', + field: 'responUser', + sort: 'custom', + isSearch: false, + isForm: true, + table: { + width: 120 + }, + form: { + componentProps: { + value: userStore.getUser.nickname, + disabled: true + } + } + }, + { + label: '处理时间', + field: 'handleTime', + isTable: false, + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + + { + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.PUBLISHE_STATUS, + dictClass: 'string', + isForm: false, + isSearch: false, + tableForm: { + type: 'Select', + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, { label: '描述', field: 'desc', @@ -478,6 +540,15 @@ export const Q2 = useCrudSchemas( } } }, + { + label: '创建者', + field: 'creator', + table: { + width: 130 + }, + isForm: false, + isTable: true + }, { label: '操作', field: 'action', diff --git a/src/views/qms/inspectionScheme/addForm.vue b/src/views/qms/inspectionScheme/addForm.vue index ef85d8566..60d97c60a 100644 --- a/src/views/qms/inspectionScheme/addForm.vue +++ b/src/views/qms/inspectionScheme/addForm.vue @@ -54,8 +54,8 @@ - - + + diff --git a/src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts b/src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts index 6dfc2a8b4..a144819ed 100644 --- a/src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts +++ b/src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts @@ -156,7 +156,16 @@ export const AgvLocationrelation = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', @@ -173,7 +182,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -196,7 +205,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts b/src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts index bcaa6d7bc..7b5fc42c7 100644 --- a/src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts +++ b/src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts @@ -109,7 +109,16 @@ export const Recordsetting = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } - } + }, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts index 7eb18b2ea..d8677ce34 100644 --- a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts @@ -48,7 +48,7 @@ export const Itembasic = useCrudSchemas(reactive([ }, }, { - label: '方案描述', + label: '描述1', field: 'desc1', sort: 'custom', table: { diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts index 326abc320..d290567a0 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts +++ b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts @@ -525,11 +525,34 @@ export const Packageunit = useCrudSchemas(reactive([ label: '创建时间', field: 'createTime', sort: 'custom', + isDetail: true, + isSearch: true, + isForm: false, + isTable: true, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, table: { width: 180 }, - formatter: dateFormatter, - isForm: false, + form: { + component: 'DatePicker', + componentProps: { + style: {width:'100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', diff --git a/src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts b/src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts index dfbb88f50..e46c7d34d 100644 --- a/src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts +++ b/src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts @@ -222,6 +222,7 @@ export const MesBarCode = useCrudSchemas(reactive([ detail: { dateFormat : 'YYYY-MM-DD HH:mm:ss' }, + isSearch: true, form: { component: 'DatePicker', componentProps: { @@ -230,7 +231,15 @@ export const MesBarCode = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'x', } - } + }, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + }, + }, }, { label: '创建者', @@ -247,7 +256,7 @@ export const MesBarCode = useCrudSchemas(reactive([ sort: 'custom', isDetail: true, isForm: false, - isTable: false, + isTable: true, formatter: dateFormatter, detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' @@ -270,7 +279,7 @@ export const MesBarCode = useCrudSchemas(reactive([ field: 'updater', isDetail: true, isForm: false, - isTable: false, + isTable: true, table: { width: 150 } diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts index a5e8701cb..c85779a32 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts @@ -84,6 +84,7 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive([ label: '运输方式', field: 'transferMode', sort: 'custom', + dictType: DICT_TYPE.TRANSFER_MODE, table: { width: 150 }, diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts index 0b25a3b59..c1d9a38db 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts @@ -98,6 +98,7 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive( label: '运输方式', field: 'transferMode', sort: 'custom', + dictType: DICT_TYPE.TRANSFER_MODE, table: { width: 150 }, diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts index 72c5ffb1a..f11e49080 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts @@ -51,7 +51,7 @@ export const CustomerreturnRecordMain = useCrudSchemas( width: 150 } }, - + { label: '发货记录单号', field: 'deliverRecordNumber', @@ -149,6 +149,7 @@ export const CustomerreturnRecordMain = useCrudSchemas( { label: '运输方式', field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, sort: 'custom', table: { width: 150 diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts index f02abe45b..74fedc839 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts @@ -118,6 +118,7 @@ export const DeliverRecordMain = useCrudSchemas( { label: '运输方式', field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, sort: 'custom', table: { width: 150 diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts index a30a1db82..bbedb984b 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts @@ -895,24 +895,24 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ } } }, - { - label: '承运商', - field: 'carrierCode', - sort: 'custom', - table: { - width: 150 - }, - }, - { - label: '运输方式', - field: 'transferMode', - sort: 'custom', - dictType: DICT_TYPE.TRANSFER_MODE, - dictClass: 'string', - table: { - width: 150 - }, - }, + // { + // label: '承运商', + // field: 'carrierCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '运输方式', + // field: 'transferMode', + // sort: 'custom', + // dictType: DICT_TYPE.TRANSFER_MODE, + // dictClass: 'string', + // table: { + // width: 150 + // }, + // }, { label: '库存状态', field: 'inventoryStatus', @@ -997,41 +997,41 @@ export const DeliverRequestDetail = useCrudSchemas(reactive([ isTableForm: false, isForm: false, }, - { - label: '备注', - field: 'remark', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - }, - { - label: '计划数量', - field: 'planQty', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - tableForm: { - disabled: true - }, - isForm: false, - }, - { - label: '已收货数量', - field: 'shippedQty', - sort: 'custom', - table: { - width: 150 - }, - isTable: false, - tableForm: { - disabled: true - }, - isForm: false, - }, + // { + // label: '备注', + // field: 'remark', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // }, + // { + // label: '计划数量', + // field: 'planQty', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // tableForm: { + // disabled: true + // }, + // isForm: false, + // }, + // { + // label: '已收货数量', + // field: 'shippedQty', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTable: false, + // tableForm: { + // disabled: true + // }, + // isForm: false, + // }, { label: '创建时间', field: 'createTime', diff --git a/src/views/wms/inventoryManage/package/index.vue b/src/views/wms/inventoryManage/package/index.vue index 93e8c1971..aee66956f 100644 --- a/src/views/wms/inventoryManage/package/index.vue +++ b/src/views/wms/inventoryManage/package/index.vue @@ -16,7 +16,8 @@ - @@ -252,7 +252,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ defaultButtons.defaultAddBtn({hasPermi:'wms:unplannedreceipt-request-main:create'}), // 新增 - //defaultButtons.defaultImportBtn({hasPermi:'wms:unplannedreceipt-request-main:import'}), // 导入 + defaultButtons.defaultImportBtn({hasPermi:'wms:unplannedreceipt-request-main:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'wms:unplannedreceipt-request-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 @@ -615,6 +615,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ + dataType:'2', templateUrl: '', templateTitle: `【${route.meta.title}】导入模版.xlsx` }) @@ -692,5 +693,6 @@ const tableFormSelectOnBlur = (field, val, row, index) => { onMounted(async () => { getList() importTemplateData.templateUrl = await UnplannedreceiptRequestMainApi.importTemplate() + console.log(344,importTemplateData) }) diff --git a/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts index 761dbda4f..62fe54e2d 100644 --- a/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts @@ -801,12 +801,66 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive([ { label: '运输方式', field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, sort: 'custom', table: { width: 150 diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts index 61664b19e..ea2dc1572 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts @@ -48,6 +48,7 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive([ { label: '运输方式', field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, sort: 'custom', table: { width: 150 diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts index 449334325..bbc5e5fb9 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts @@ -53,6 +53,7 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive([ { label: '运输方式', field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, sort: 'custom', table: { width: 150 diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts index 246d16e93..8c372733c 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts @@ -66,6 +66,7 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive( { label: '运输方式', field: 'transferMode', + dictType: DICT_TYPE.TRANSFER_MODE, sort: 'custom', table: { width: 150 diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts index 32c7b00bf..b67ca0711 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts @@ -115,6 +115,7 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive( table: { width: 180 }, + isSearch: true, form: { component: 'DatePicker', componentProps: { diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index 9cb708a64..a6e26c386 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -734,10 +734,12 @@ const submitForm = async (formType, submitData) => { if(flag){ return } + data.dataType='1' formRef.value.formLoading = true await UnplannedreceiptRequestMainApi.createUnplannedreceiptRequestMain(data) message.success(t('common.createSuccess')) } else { + data.dataType='1' formRef.value.formLoading = true await UnplannedreceiptRequestMainApi.updateUnplannedreceiptRequestMain(data) message.success(t('common.updateSuccess')) diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index c38810975..b4fff91b6 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -208,13 +208,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } else { row['batch'] = '000000' } + // HL-4885 聂喜婷:@邱晨 @王宇飞 先把数量的校验拿掉 // 修改 tableform 属性 数量最大值设置为库存余额中数量 // TODO: tableFormColumns 修改属性目前只限于整个列 并不满足行要求 例如: 第一条数据最大10 第二条数据最大20 那么第一条数据会变成最大20限制 - ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { - if(item.field == 'qty' && val[0]['qty'] > 0) { - item.tableForm.max = val[0]['qty'] - } - }) + // ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { + // if(item.field == 'qty' && val[0]['qty'] > 0) { + // item.tableForm.max = val[0]['qty'] + // } + // }) } } else if(formField == 'workStationCode') { // 明细查询页赋值 @@ -257,12 +258,13 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { } else { setV['batch'] = '000000' } + // HL-4885 聂喜婷:@邱晨 @王宇飞 先把数量的校验拿掉 // 修改 tableform 属性 数量最大值设置为库存余额中数量 - ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { - if(item.field == 'qty' && val[0]['qty'] > 0) { - item.tableForm.max = val[0]['qty'] - } - }) + // ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { + // if(item.field == 'qty' && val[0]['qty'] > 0) { + // item.tableForm.max = val[0]['qty'] + // } + // }) } } else if(formField == 'workStationCode') { setV['workStationCode'] = val[0]['code'] diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index 14dd3b34a..817725eb9 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -193,15 +193,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => row['uom'] = val[0]['uom'] row['inventoryStatus'] = val[0]['inventoryStatus'] row['qty'] = Number(val[0]['qty']) + // HL-4885 聂喜婷:@邱晨 @王宇飞 先把数量的校验拿掉 // 修改 tableform 属性 数量最大值设置为库存余额中数量 - ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => { - if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) { - item.tableForm.max = Number(val[0]['qty']) - } - // if(item.field == 'batch') { - // item.tableForm.disabled = false - // } - }) + // ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => { + // if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) { + // item.tableForm.max = Number(val[0]['qty']) + // } + // // if(item.field == 'batch') { + // // item.tableForm.disabled = false + // // } + // }) } } else if(formField == 'workStationCode') { val.forEach(item=>{ @@ -238,12 +239,13 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { setV['uom'] = val[0]['uom'] setV['inventoryStatus'] = val[0]['inventoryStatus'] setV['qty'] = val[0]['qty'] + // HL-4885 聂喜婷:@邱晨 @王宇飞 先把数量的校验拿掉 // 修改 tableform 属性 数量最大值设置为库存余额中数量 - ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { - if(item.field == 'qty') { - item.tableForm.max = val[0]['qty'] - } - }) + // ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { + // if(item.field == 'qty') { + // item.tableForm.max = val[0]['qty'] + // } + // }) } } else if(formField == 'workStationCode') { setV['workStationCode'] = val[0]['code'] diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts index 84ef721ef..428350a3a 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts @@ -564,11 +564,13 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive { tableData.value = tableData.value.filter(item => !selection.includes(item)) } //为true表示子表数据中存在数量为0的数据 -const flag = ref() // 主子数据 提交 const submitForm = async (formType, submitData) => { @@ -334,15 +333,20 @@ const submitForm = async (formType, submitData) => { data.id = data.masterId } data.subList = tableData.value // 拼接子表数据参数 + let flag = false data.subList.forEach(item => { item.toBatch = item.fromBatch item.fromLocationCode = data.fromLocationCode item.toLocationCode = data.toLocationCode item.toInventoryStatus = data.toInventoryStatus - - if(item.qty == 0){ - message.error(`数量不能为0!`) - flag.value = true + if(item.checkQty>0&&Number(item.qty)==0){ + message.error(`${item['itemCode']}数量不能为0!`) + flag = true + return; + } + if(item.checkQty>0&&item.qty<0){ + message.error(`${item['itemCode']}数量不能小于0!`) + flag = true return; } }) @@ -351,7 +355,7 @@ const submitForm = async (formType, submitData) => { message.warning('从库位和到库位不能相同') return } - if(flag.value){ + if(flag){ formRef.value.formLoading = false return } @@ -387,6 +391,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow['fromInventoryStatus'] = item['inventoryStatus'] newRow['origin_fromLocationCode'] = item['locationCode'] newRow['uom'] = item['uom'] + newRow['checkQty'] = item['qty'] //用于保存的时候作校验 HL-5524 newRow['qty'] = item['qty'] if(item['packingNumber']&&item['packingNumber'].length>0){ newRow['packUnit'] = item['packUnit'] diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts index b35bd6e88..5f075da73 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts @@ -411,14 +411,14 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( form: { component: 'InputNumber', componentProps: { - min: 0, + // min: 0, precision: 6 } }, tableForm: { disabled: false, type: 'InputNumber', - min: 0, + // min: 0, precision: 6 } }, diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue index f3cd23330..edda6cdf3 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue @@ -44,6 +44,7 @@ ref="formRef" :isOpenSearchTable="true" fieldTableColumn="fromPackingNumber" + :includeCollectionTable="true" @success="getList" :rules="InventorymoveRequestMainRules" :formAllSchemas="InventorymoveRequestMain.allSchemas" @@ -90,6 +91,7 @@ import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDe import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as LocationApi from '@/api/wms/location' import { formatDate } from '@/utils/formatTime' +import dayjs from 'dayjs' // 库存转移申请 defineOptions({ name: 'InventorymoveRequestMain' }) @@ -615,6 +617,24 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const formRef = ref() const openForm =async (type: string, row?: number) => { + if(type=='create'){ + InventorymoveRequestMain.allSchemas.formSchema.forEach(item =>{ + if(item.field == 'fromWarehouseCode'){ + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + if(item.field == 'dueTime') { + item.value = dayjs().add(1, 'hour').valueOf() + } + }) + }else{ + InventorymoveRequestMain.allSchemas.formSchema.forEach(item =>{ + if(item.field == 'fromWarehouseCode'){ + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + }) + } tableData.value = [] // 重置明细数据 formRef.value.open(type, row) } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts index 6f6e21b82..ba810d477 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts @@ -584,7 +584,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( }, tableForm:{ multiple:true, - isInpuFocusShow: true, // 开启查询弹窗 + disabled:true, + isInpuFocusShow: false, // 开启查询弹窗 searchListPlaceholder: '请选择从包装号', searchField: 'packingNumber', searchTitle: '库存余额信息', diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue index 542698de4..ca527db82 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue @@ -198,6 +198,7 @@ const butttondata = (row,$index) => { // defaultButtons.mainInspectRequestBtn({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainInspectRequestBtn({hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainListPointBtn(null), // 标签打印 + defaultButtons.mainListRecoveryBtn(null), // 制品回收 ] } @@ -207,8 +208,11 @@ const buttonTableClick = async (val, row) => { handleCreateInspectRequest(row.number) } else if (val == 'point') { // 标签打印 labelPrint(row) + } else if (val == 'recovery') { //制品回收 + labelRecovery(row) } } + const BASE_URL = getJmreportBaseUrl() // 标签打印 const searchTableRef = ref() @@ -241,6 +245,18 @@ const labelPrint = async (row) => { }) searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) } +//制品回收按钮事件 +const labelRecovery = async (row) => { + try { + await message.confirm(t('ts.确认撤销报工吗?')) + tableObject.loading = true + let resType = await ProductreceiptRecordMainApi.handleRecoveryProductreceiptRecord(row) + message.success(t('ts.确认撤销报工成功')) + } catch { + } finally { + tableObject.loading = false + } +} // 批量打印--预生产收货 const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => { console.log('批量打印',val) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts index b2496493b..93ea1921c 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts @@ -742,7 +742,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive( isDetail: false, isForm: false , table: { - width: 220, + width: 280, fixed: 'right' }, isTableForm:true, diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index f5706b3e0..a5be22d72 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -1,23 +1,31 @@