Browse Source

Merge branch 'hella_online_20240803' into master_hella

hella_online_20240829
陈薪名 3 months ago
parent
commit
69bf4a5d05
  1. 5
      src/api/wms/productreceiptRecordMain/index.ts
  2. 15
      src/components/BasicForm/src/BasicForm.vue
  3. 6
      src/components/ImportForm/src/ImportForm.vue
  4. 16
      src/locales/en-US.ts
  5. 3
      src/locales/zh-CN.ts
  6. 12
      src/utils/disposition/defaultButtons.ts
  7. 10
      src/views/login/components/LoginForm.vue
  8. 12
      src/views/qms/inspectionJob/index.vue
  9. 87
      src/views/qms/inspectionQ1/index.vue
  10. 238
      src/views/qms/inspectionQ1/inspectionQ1.data.ts
  11. 136
      src/views/qms/inspectionQ2/index.vue
  12. 343
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  13. 4
      src/views/qms/inspectionScheme/addForm.vue
  14. 15
      src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts
  15. 11
      src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts
  16. 2
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  17. 27
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts
  18. 15
      src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts
  19. 1
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts
  20. 1
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts
  21. 3
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts
  22. 1
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts
  23. 106
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  24. 112
      src/views/wms/inventoryManage/package/index.vue
  25. 140
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts
  26. 140
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts
  27. 22
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  28. 267
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  29. 2
      src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/sparepartReturnRecordMain.data.ts
  30. 6
      src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue
  31. 62
      src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts
  32. 1
      src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts
  33. 1
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts
  34. 1
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts
  35. 1
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts
  36. 1
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts
  37. 2
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  38. 22
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  39. 28
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  40. 2
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
  41. 17
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue
  42. 4
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts
  43. 20
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue
  44. 3
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts
  45. 16
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  46. 2
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts
  47. 748
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  48. 203
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  49. 15
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue
  50. 84
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  51. 42
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts
  52. 31
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  53. 3
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
  54. 2
      src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts
  55. 1
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/purchasereceiptRecordMain.data.ts
  56. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue
  57. 1
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts
  58. 4
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts
  59. 5
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts
  60. 1
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts
  61. 21
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
  62. 14
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue
  63. 18
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
  64. 8
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  65. 8
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
  66. 8
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts

5
src/api/wms/productreceiptRecordMain/index.ts

@ -126,3 +126,8 @@ export const createPutawayRequest = async (number:string) => {
export const createInspectRequest = async (number:string) => { export const createInspectRequest = async (number:string) => {
return await request.post({ url: `/wms/productreceipt-record-main/createInspectRequest?number=`+number }) 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 })
}

15
src/components/BasicForm/src/BasicForm.vue

@ -78,14 +78,14 @@
<el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail == 'InputString'" /> <el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail == 'InputString'" />
</template> </template>
</Form> </Form>
<Tabs ref="tabRef" v-if="formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" :tabsList="[{ <Tabs ref="tabRef" v-if="includeCollectionTable&&formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" :tabsList="[{
label: '明细', label: '明细',
prop: 'TableForm' prop: 'TableForm'
},{ },{
label: '汇总', label: '汇总',
prop: 'CollectionTable' prop: 'CollectionTable'
}]" v-model="tabSheet" @change="tabChange"/> }]" v-model="tabSheet" @change="tabChange"/>
<div class="table" v-if="(tabSheet=='TableForm'&&isBusiness && formType == 'create' && fromeWhere != 'countPlan')||(tabSheet=='TableForm'&&isBusiness && formType == 'update' && updateTypeEdiltSubList && fromeWhere != 'countPlan')"> <div class="table" v-if="tableAllSchemas&&tableAllSchemas.tableFormColumns&& fromeWhere != 'countPlan'" v-show="(tabSheet=='TableForm'&&isBusiness && formType == 'create' && fromeWhere != 'countPlan')||(tabSheet=='TableForm'&&isBusiness && formType == 'update' && updateTypeEdiltSubList && fromeWhere != 'countPlan')">
<TableForm <TableForm
ref="tableFormRef" ref="tableFormRef"
class="w-[100%]" class="w-[100%]"
@ -123,7 +123,7 @@
</template> </template>
</TableForm> </TableForm>
</div> </div>
<div v-if="tabSheet=='TableForm'&&isBusiness && formType == 'create' && fromeWhere == 'countPlan'"> <div v-if="tableAllSchemas&&tableAllSchemas.tableFormColumns&& fromeWhere == 'countPlan'" v-show="tabSheet=='TableForm'&&isBusiness && formType == 'create' && fromeWhere == 'countPlan'">
<TableFormCountPlan <TableFormCountPlan
:tableFields="tableAllSchemas.tableFormColumns" :tableFields="tableAllSchemas.tableFormColumns"
:tableData="tableData" :tableData="tableData"
@ -135,7 +135,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
/> />
</div> </div>
<div v-if="formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" v-show="tabSheet=='CollectionTable'"> <div v-if="includeCollectionTable&&formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" v-show="tabSheet=='CollectionTable'">
<CollectionTable <CollectionTable
:tableFields="tableAllSchemas?tableAllSchemas.tableFormColumns:[]" :tableFields="tableAllSchemas?tableAllSchemas.tableFormColumns:[]"
:tableData="tableData" :tableData="tableData"
@ -369,7 +369,12 @@ const props = defineProps({
isCheckStrictly:{ isCheckStrictly:{
type:Boolean, type:Boolean,
default:false default:false
} },
// true ; false
includeCollectionTable:{
type:Boolean,
default:false
},
}) })
const { t } = useI18n() // const { t } = useI18n() //

6
src/components/ImportForm/src/ImportForm.vue

@ -16,7 +16,8 @@
outFile + outFile +
'&extend=' + extend + '&extend=' + extend +
'&fromInventoryStatus=' + fromInventoryStatus + '&fromInventoryStatus=' + fromInventoryStatus +
'&toInventoryStatus=' + toInventoryStatus '&toInventoryStatus=' + toInventoryStatus +
dataType
" "
:auto-upload="false" :auto-upload="false"
:disabled="formLoading" :disabled="formLoading"
@ -229,6 +230,9 @@ const props = defineProps({
} }
}) })
const importTemplateData = ref(props.importTemplateData) const importTemplateData = ref(props.importTemplateData)
console.log(333,props.importTemplateData.dataType)
const dataType = ref('')
dataType.value = props.importTemplateData.dataType ?'&dataType=' + props.importTemplateData.dataType :''
const accept = ref(props.accept) const accept = ref(props.accept)
const mode = ref(props.mode) //.1 const mode = ref(props.mode) //.1
const updateIsDisable = ref(props.updateIsDisable) //, const updateIsDisable = ref(props.updateIsDisable) //,

16
src/locales/en-US.ts

@ -615,11 +615,11 @@ export default {
code:'Code', code:'Code',
name:'Name', name:'Name',
}, },
ts: { ts: {
:'Code', :'Code',
:'All', :'All',
@ -1126,7 +1126,7 @@ export default {
2:'Please input package specification2', 2:'Please input package specification2',
2:'Please input package quantity2', 2:'Please input package quantity2',
:'submit for approval', :'submit for approval',
// 系统管理:'system management', // 系统管理:'system management',
// 基础设施:'infrastructure', // 基础设施:'infrastructure',
// 报表管理:'report manager', // 报表管理:'report manager',
// 报表:'statement', // 报表:'statement',
@ -1280,9 +1280,9 @@ export default {
:'Rule configuration', :'Rule configuration',
:'Please enter a contact number', :'Please enter a contact number',
:'Please enter a name', :'Please enter a name',
'确认撤销报工吗?':'Are you sure to cancel the job application?',
}, },
} }

3
src/locales/zh-CN.ts

@ -538,7 +538,7 @@ export default {
'pcs':'个', 'pcs':'个',
free_library_bits_or_total_library_bits:'空闲库位数/总库位数', free_library_bits_or_total_library_bits:'空闲库位数/总库位数',
slack_stock_warning:'呆滞库存预警', slack_stock_warning:'呆滞库存预警',
package_number:'包装号', package_number:'包装号',
@ -1277,6 +1277,7 @@ export default {
:'规则配置', :'规则配置',
:'请输入联系电话', :'请输入联系电话',
:'请选择范围', :'请选择范围',
'确认撤销报工吗?':"确认撤销报工吗?",
}, },
} }

12
src/utils/disposition/defaultButtons.ts

@ -1054,6 +1054,18 @@ export function mainListPointBtn(option: any) {
hasPermi: '' hasPermi: ''
}) })
} }
// 主列表-回收
export function mainListRecoveryBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.撤销报工`).replace('ts.', ''),
name: 'recovery',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-批量打印 // 主列表-批量打印
export function mainLisSelectiontPointBtn(option: any) { export function mainLisSelectiontPointBtn(option: any) {
return __defaultBtnOption(option, { return __defaultBtnOption(option, {

10
src/views/login/components/LoginForm.vue

@ -30,7 +30,7 @@
<el-col :span="24" style="padding-right: 10px; padding-left: 10px"> <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item prop="password"> <el-form-item prop="password">
<el-input v-model="loginData.loginForm.password" :placeholder="t('login.passwordPlaceholder')" <el-input v-model="loginData.loginForm.password" :placeholder="t('login.passwordPlaceholder')"
:prefix-icon="iconLock" show-password type="password" @keyup.enter="getCode()" style="height: 42px;" /> :prefix-icon="iconLock" show-password type="password" @keyup.enter="passwordEnter" style="height: 42px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px" v-if="needCode"> <el-col :span="24" style="padding-right: 10px; padding-left: 10px" v-if="needCode">
@ -173,6 +173,14 @@
// verify.value.show() // verify.value.show()
// } // }
// } // }
const passwordEnter = ()=>{
if(!needCode.value){
handleLogin()
return
}else{
getCode()
}
}
function getCode() { function getCode() {
if(!needCode.value){ if(!needCode.value){
return return

12
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) => { const isShowMainButton2 = (row, val) => {
if (val.indexOf(row.isStaging) > -1) { if (val.indexOf(row.isStaging) > -1) {
@ -283,7 +291,9 @@ const butttondata = (row) => {
hasPermi: 'qms:inspection-job-main:execute' hasPermi: 'qms:inspection-job-main:execute'
}), // }), //
defaultButtons.mainListPackageBtn(null), // defaultButtons.mainListPackageBtn(null), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) // defaultButtons.mainListPlanCheckQualityReportBtn({
hide: isShowMainButton3(row)
}) //
] ]
} }
const listTableRef = ref() const listTableRef = ref()

87
src/views/qms/inspectionQ1/index.vue

@ -74,12 +74,15 @@
import download from '@/utils/download' import download from '@/utils/download'
import { Q1, Q1Rules } from './inspectionQ1.data' import { Q1, Q1Rules } from './inspectionQ1.data'
import * as Q1Api from '@/api/qms/inspectionQ1' import * as Q1Api from '@/api/qms/inspectionQ1'
import * as ItembasicApi from '@/api/wms/itembasic'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as StdcostpriceApi from '@/api/wms/stdcostprice' import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import { formatDate } from '@/utils/formatTime' 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' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -97,30 +100,64 @@ const tableColumns = ref(Q1.allSchemas.tableColumns)
// //
const priceObj = ref() const priceObj = ref()
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(async () => { nextTick(async () => {
const setV = {} const setV = {}
if (formField == 'customerCode') {
setV['itemCode'] = ''
}
if (formField == 'itemCode') { if (formField == 'itemCode') {
setV['customerCode'] = ''
setV['customerName'] = ''
setV['itemName'] = ''
setV['standardCostPrice'] = ''
setV['qty'] = ''
setV['claimAmount'] = ''
setV['uom'] = val[0]['customerUom'] setV['uom'] = val[0]['customerUom']
console.log(333,val[0].code) CustomeritemApi.getCustomerItemListByCodes({
const params = { itemCodes: val[0].itemCode,
by: "ASC", customerCode: ''
filters: [{column: "itemCode", action: "==", value: val[0].itemCode}], }).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, pageNo: 1,
pageSize: 500, pageSize: 500,
sort: "" sort: ''
} }
params.isSearch = true paramsStdcostprice.isSearch = true
StdcostpriceApi.getStdcostpricePage(params).then((res) => { StdcostpriceApi.getStdcostpricePage(paramsStdcostprice).then((res) => {
if (res.list?.length > 0) { if (res.list?.length > 0) {
priceObj.value = res.list[0] priceObj.value = res.list[0]
formRef.setValues({ formRef.setValues({
claimAmount: (parseFloat(formRef.formModel.qty) * parseFloat(priceObj.value.price)).toFixed(6) standardCostPrice: priceObj.value.price
}) })
} }
}) })
} }
setV[formField] = val[0][searchField] 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') { 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
}
})
}
} }
// //

238
src/views/qms/inspectionQ1/inspectionQ1.data.ts

@ -15,16 +15,16 @@ const userStore = useUserStore()
// 表单校验 // 表单校验
export const Q1Rules = reactive({ export const Q1Rules = reactive({
customerCode: [required], itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }],
costCode: [required], customerCode: [{ required: true, message: '请选择客户代码', trigger: 'change' }],
itemCode: [required], qty: [{ required: true, message: '请输入数量', trigger: 'change' }],
qty: [required], claimAmount: [{ required: true, message: '请输入索赔金额', trigger: 'change' }],
code: [required], code: [{ required: true, message: '请选择缺陷代码', trigger: 'change' }],
priority: [required], priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
claimAmount: [required], costCode: [{ required: true, message: '请选择选择成本中心代码', trigger: 'change' }],
claimReason: [required], claimTime: [{ required: true, message: '请选择选择索赔日期', trigger: 'change' }],
claimTime: [required], handleTime: [{ required: true, message: '请选择选择处理时间', trigger: 'change' }],
handleTime: [required] claimReason: [{ required: true, message: '请选择选择索赔原因', trigger: 'change' }]
}) })
export const Q1 = useCrudSchemas( export const Q1 = useCrudSchemas(
@ -40,62 +40,6 @@ export const Q1 = useCrudSchemas(
fixed: 'left' 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: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
@ -119,12 +63,6 @@ export const Q1 = useCrudSchemas(
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
message: '请填写客户代码!',
isMainValue: true
} }
], ],
verificationParams: [ verificationParams: [
@ -141,76 +79,107 @@ export const Q1 = useCrudSchemas(
} }
}, },
{ {
label: '数量', label: '物料名称',
field: 'qty', field: 'itemName',
sort: 'custom', sort: 'custom',
isTable: true, dictClass: 'string',
isSearch: false, isSearch: false,
table: { isTable: true,
width: 150 tableForm: {
disabled: true
}, },
form: { form: {
component: 'InputNumber',
componentProps: { componentProps: {
min: 0, disabled: true
precision: 2
} }
} }
}, },
{ {
label: '单位', label: '客户代码',
field: 'uom', field: 'customerCode',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
tableForm: { tableForm: {
type: 'Select',
disabled: true disabled: true
}, },
form: { form: {
component: 'Select',
componentProps: { componentProps: {
disabled: true options: [],
optionsAlias: {
labelField: 'customerCode',
valueField: 'customerCode'
},
filterable: true
} }
} }
}, },
{ {
label: '编码', label: '客户名称',
field: 'code', field: 'customerName',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QMS_Q1_CODE,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isTable: true,
isSearch: false,
table: { table: {
width: 180 width: 150
}, },
tableForm: { form: {
type: 'Select' component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
} }
}, },
{ {
label: '优先级', label: '单位',
field: 'priority', field: 'uom',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY, dictType: DICT_TYPE.UOM,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: false, isTable: true,
tableForm: { tableForm: {
type: 'Select' type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
} }
}, },
{ {
label: '负责用户', label: '标准成本价格',
field: 'responUser', field: 'standardCostPrice',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: false, table: {
width: 150
},
form: { form: {
component: 'InputNumber',
componentProps: { componentProps: {
value: userStore.getUser.nickname, min: 0,
precision: 6,
disabled: true 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: '成本中心代码', 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: '处理时间', label: '处理时间',
field: 'handleTime', 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: '描述', label: '描述',
field: 'desc', field: 'desc',
@ -392,8 +419,17 @@ export const Q1 = useCrudSchemas(
valueFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange', type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}, }
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
}, },
isForm: false,
isTable: true
}, },
{ {
label: '操作', label: '操作',

136
src/views/qms/inspectionQ2/index.vue

@ -55,6 +55,7 @@
:apiCreate="Q2Api.createQ2" :apiCreate="Q2Api.createQ2"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
@onChange="onChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -77,7 +78,11 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import { formatDate } from '@/utils/formatTime' 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' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -93,37 +98,126 @@ routeName.value = route.name
const tableColumns = ref(Q2.allSchemas.tableColumns) const tableColumns = ref(Q2.allSchemas.tableColumns)
// //
const priceObj = ref()
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(async () => {
const setV = {} const setV = {}
if (formField == 'supplierCode') { 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') { if (formField == 'itemCode') {
setV['uom'] = val[0]['supplierUom'] setV['SupplierCode'] = ''
} setV['SupplierName'] = ''
// if (formField == 'q1Number') { setV['itemName'] = ''
// console.log(123) setV['standardCostPrice'] = ''
// setV['q1Number'] = val[0]['number'] setV['qty'] = ''
// } setV['claimAmount'] = ''
if (formField == 'purchaseReceiptNumber') {
setV['wmsQty'] = val[0]['qty'] setV['uom'] = val[0].supplierUom
} const supplieritemParams = {
if (formField == 'q1Number') { by: 'ASC',
//Q1 filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode}],
let list = [] pageNo: 1,
val.forEach((item) => { pageSize: 500,
list.push(item[searchField]) 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) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val

343
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -49,70 +49,14 @@ export const Q2 = useCrudSchemas(
fixed: 'left' 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: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true,
table: { table: {
width: 190 width: 150
}, },
isSearch: true,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
@ -124,12 +68,6 @@ export const Q2 = useCrudSchemas(
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [
{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
},
{ {
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
@ -150,32 +88,51 @@ export const Q2 = useCrudSchemas(
} }
}, },
{ {
label: '数量', label: '物料名称',
field: 'qty', field: 'itemName',
sort: 'custom', sort: 'custom',
dictClass: 'string',
isSearch: false,
isTable: true, isTable: true,
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
dictClass: 'string',
isSearch: false, isSearch: false,
table: { isTable: true,
width: 150 tableForm: {
disabled: true
}, },
form: { form: {
component: 'InputNumber', component: 'Select',
componentProps: { componentProps: {
min: 0, options: [],
precision: 2 optionsAlias: {
labelField: 'supplierCode',
valueField: 'supplierCode'
},
filterable: true
} }
} }
}, },
{ {
label: '单位', label: '供应商名称',
field: 'uom', field: 'supplierName',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
tableForm: { tableForm: {
type: 'Select',
disabled: true disabled: true
}, },
form: { form: {
@ -188,7 +145,7 @@ export const Q2 = useCrudSchemas(
label: '采购收货单号', label: '采购收货单号',
field: 'purchaseReceiptNumber', field: 'purchaseReceiptNumber',
sort: 'custom', sort: 'custom',
isTable: false, isTable: true,
table: { table: {
width: 180 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: '采购收货数量', label: '数量',
field: 'wmsQty', field: 'qty',
sort: 'custom', sort: 'custom',
isTable: true,
isSearch: false, 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, isTable: false,
isDetail: false isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
}
}, },
{ {
label: '编码', label: '缺陷编码',
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QMS_Q2_CODE, dictType: DICT_TYPE.QMS_Q2_CODE,
@ -254,7 +291,6 @@ export const Q2 = useCrudSchemas(
type: 'Select' type: 'Select'
} }
}, },
{ {
label: '优先级', label: '优先级',
field: 'priority', field: 'priority',
@ -268,26 +304,38 @@ export const Q2 = useCrudSchemas(
} }
}, },
{ {
label: '负责用户', label: '其他索赔描述',
field: 'responUser', field: 'otherClaimDesc',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: true,
table: { table: {
width: 120 width: '150'
},
form: {
component: 'Input',
componentProps: {}
}
},
{
label: '其他索赔金额',
field: 'otherclaimAmount',
sort: 'custom',
isSearch: false,
table: {
width: 150
}, },
form: { form: {
component: 'InputNumber',
componentProps: { componentProps: {
value: userStore.getUser.nickname, min: 0,
disabled: true precision: 6,
} }
} }
}, },
{ {
label: '索赔金额', label: '汇总金额',
field: 'claimAmount', field: 'summaryAmount',
sort: 'custom', sort: 'custom',
isTable: false,
isSearch: false, isSearch: false,
table: { table: {
width: 150 width: 150
@ -296,7 +344,8 @@ export const Q2 = useCrudSchemas(
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 0, 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通知单号', label: 'Q1通知单号',
field: 'q1Number', field: 'q1Number',
@ -424,6 +430,62 @@ export const Q2 = useCrudSchemas(
}, },
isSearch: true 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: '描述', label: '描述',
field: 'desc', field: 'desc',
@ -478,6 +540,15 @@ export const Q2 = useCrudSchemas(
} }
} }
}, },
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

4
src/views/qms/inspectionScheme/addForm.vue

@ -54,8 +54,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="描述" prop="description"> <el-form-item label="方案描述" prop="description">
<el-input v-model="data.description" placeholder="请填写描述" /> <el-input v-model="data.description" placeholder="请填写方案描述" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">

15
src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts

@ -156,7 +156,16 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', 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: '创建者', label: '创建者',
@ -173,7 +182,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -196,7 +205,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

11
src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts

@ -109,7 +109,16 @@ export const Recordsetting = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', 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: '创建者', label: '创建者',

2
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -48,7 +48,7 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '方案描述', label: '描述1',
field: 'desc1', field: 'desc1',
sort: 'custom', sort: 'custom',
table: { table: {

27
src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts

@ -525,11 +525,34 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
isDetail: true,
isSearch: true,
isForm: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 180 width: 180
}, },
formatter: dateFormatter, form: {
isForm: false, 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: '创建者', label: '创建者',

15
src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts

@ -222,6 +222,7 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
detail: { detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss' dateFormat : 'YYYY-MM-DD HH:mm:ss'
}, },
isSearch: true,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -230,7 +231,15 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', 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: '创建者', label: '创建者',
@ -247,7 +256,7 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -270,7 +279,7 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

1
src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts

@ -84,6 +84,7 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRANSFER_MODE,
table: { table: {
width: 150 width: 150
}, },

1
src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts

@ -98,6 +98,7 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRANSFER_MODE,
table: { table: {
width: 150 width: 150
}, },

3
src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts

@ -51,7 +51,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(
width: 150 width: 150
} }
}, },
{ {
label: '发货记录单号', label: '发货记录单号',
field: 'deliverRecordNumber', field: 'deliverRecordNumber',
@ -149,6 +149,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts

@ -118,6 +118,7 @@ export const DeliverRecordMain = useCrudSchemas(
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

106
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -895,24 +895,24 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '承运商', // label: '承运商',
field: 'carrierCode', // field: 'carrierCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '运输方式', // label: '运输方式',
field: 'transferMode', // field: 'transferMode',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.TRANSFER_MODE, // dictType: DICT_TYPE.TRANSFER_MODE,
dictClass: 'string', // dictClass: 'string',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '库存状态', label: '库存状态',
field: 'inventoryStatus', field: 'inventoryStatus',
@ -997,41 +997,41 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
}, },
{ // {
label: '备注', // label: '备注',
field: 'remark', // field: 'remark',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable: false, // isTable: false,
}, // },
{ // {
label: '计划数量', // label: '计划数量',
field: 'planQty', // field: 'planQty',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable: false, // isTable: false,
tableForm: { // tableForm: {
disabled: true // disabled: true
}, // },
isForm: false, // isForm: false,
}, // },
{ // {
label: '已收货数量', // label: '已收货数量',
field: 'shippedQty', // field: 'shippedQty',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable: false, // isTable: false,
tableForm: { // tableForm: {
disabled: true // disabled: true
}, // },
isForm: false, // isForm: false,
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

112
src/views/wms/inventoryManage/package/index.vue

@ -16,7 +16,8 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable <Table ref="tableRef" :selection="true"
v-clientTable
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -26,6 +27,7 @@
v-model:pageSize="tableObject.pageSize" v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows"
> >
<template #number="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
@ -69,7 +71,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as EquipmentInspectionRecordMainApi from "@/api/eam/equipmentInspectionRecordMain"; import * as EquipmentInspectionRecordMainApi from "@/api/eam/equipmentInspectionRecordMain";
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'package' }) defineOptions({ name: 'package' })
const message = useMessage() // const message = useMessage() //
@ -125,6 +127,7 @@ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), // defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -148,6 +151,8 @@ const buttonBaseClick = (val, item) => {
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
} else if (val=='selection_point'){//
handleSelectionPoint()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({ searchFormClick({
@ -162,6 +167,55 @@ const buttonBaseClick = (val, item) => {
} }
} }
const selectionRows = ref<any>([])
const tableRef = ref()
const getSelectionRows = (currentPage,currentPageSelectionRows) => {
console.log("getSelectionRows",currentPage,currentPageSelectionRows)
const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage)
if(currentRows){
currentRows.selectionRows = currentPageSelectionRows
}else{
selectionRows.value.push({
currentPage,
selectionRows:currentPageSelectionRows
})
}
}
const handleSelectionPoint = async ()=>{
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
})
console.log('批量打印',rows.join(','))
let getLoading = ElLoading.service({
lock: true,
text: 'loading...',
background: 'rgba(0, 0, 0, 0.7)'
})
PackageApi.batchPrintingLable(rows).then(res => {
console.log('批量打印res',res);
getLoading?.close()
if(res.zzLabel){
//
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res.zzLabel)
}
if (res.cgLabel) {
//
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res.cgLabel)
}
if(!res.cgLabel&&!res.zzLabel){
message.warning('包装不存在,无法打印或者是线边物料数据不生成包装!')
}
}).catch(err => {
console.log(err)
getLoading?.close()
})
}
// //
// const isShowMainButton = (row,val) => { // const isShowMainButton = (row,val) => {
// if (val.indexOf(row.status) > -1) { // if (val.indexOf(row.status) > -1) {
@ -305,28 +359,46 @@ const formsSuccess = async (formType,data) => {
const labelType = ref('') // const labelType = ref('') //
const handlePoint = async (row) => { const handlePoint = async (row) => {
console.log(row.packingNumber,445555555555555); console.log(row.packingNumber,445555555555555);
PackageApi.getBalanceToPackage(row.number).then(res => { PackageApi.batchPrintingLable([row.number]).then(res => {
console.log(777,res); console.log('批量打印res',res);
if (res.productionLineCode != null) { if(res.zzLabel){
labelType.value = 'zz' //
} else { const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
labelType.value = 'cg' window.open(src.value+'&asn_number='+res.zzLabel)
}
if (res.cgLabel) {
//
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res.cgLabel)
}
if(!res.cgLabel&&!res.zzLabel){
message.warning('包装不存在,无法打印或者是线边物料数据不生成包装!')
} }
PackageApi.batchPrintingLable((res.number)).then((resLable) =>{
console.log(159,resLable )
//
if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
console.log(159,resLable )
window.open(src.value+'&asn_number='+resLable)
} else {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&asn_number='+resLable)
}
})
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
// PackageApi.getBalanceToPackage(row.number).then(res => {
// console.log(777,res);
// if (res.productionLineCode != null) {
// labelType.value = 'zz'
// } else {
// labelType.value = 'cg'
// }
// PackageApi.batchPrintingLable((res.number)).then((resLable) =>{
// console.log(159,resLable )
// //
// if (labelType.value == 'cg') {
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
// console.log(159,resLable )
// window.open(src.value+'&asn_number='+resLable)
// } else {
// const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+resLable)
// }
// })
// }).catch(err => {
// console.log(err)
// })
} }
/** 导入 */ /** 导入 */

140
src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts

@ -1,6 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
/** /**
* @returns {Array} * @returns {Array}
@ -26,6 +34,138 @@ export const ScrapJobMain = useCrudSchemas(
}, },
isSearch: true isSearch: true
}, },
{
label: '成本中心代码',
field: 'costCenterCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码',
searchField: 'costcentreCode',
searchTitle: '成本中心代码',
searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '成本中心类型',
field: 'costCenterType',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
},
{
label: '领用原因代码',
field: 'reasonCodeRequisition',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成领用原因代码',
searchField: 'code',
searchTitle: '领用原因代码',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类
searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}]
}
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息',
searchField: 'projectCode',
searchTitle: '领用原因代码',
searchAllSchemas: QadProject.allSchemas,
searchPage: QadProjectApi.getQadProjectPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本
searchField: 'projectCode', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '工作中心',
field: 'workCenter',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: 'Q1通知单号', label: 'Q1通知单号',
field: 'q1Number', field: 'q1Number',

140
src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts

@ -1,6 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
/** /**
* @returns {Array} * @returns {Array}
@ -35,6 +43,138 @@ export const ScrapRecordMain = useCrudSchemas(
}, },
isSearch: true isSearch: true
}, },
{
label: '成本中心代码',
field: 'costCenterCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码',
searchField: 'costcentreCode',
searchTitle: '成本中心代码',
searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '成本中心类型',
field: 'costCenterType',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
},
{
label: '领用原因代码',
field: 'reasonCodeRequisition',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成领用原因代码',
searchField: 'code',
searchTitle: '领用原因代码',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类
searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}]
}
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息',
searchField: 'projectCode',
searchTitle: '领用原因代码',
searchAllSchemas: QadProject.allSchemas,
searchPage: QadProjectApi.getQadProjectPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本
searchField: 'projectCode', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '工作中心',
field: 'workCenter',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: 'Q1通知单号', label: 'Q1通知单号',
field: 'q1Number', field: 'q1Number',

22
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -186,9 +186,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }
} else { } else {
console.log("报废出库主表")
const setV = {} const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
if (formField == 'q1Number') { if (formField == 'q1Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => { ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q2Number' || item.field == 'q3Number') { if (item.field == 'q2Number' || item.field == 'q3Number') {
@ -216,7 +215,24 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
} }
}) })
} }
if(formField === 'usageDescription'){
setV['usageDescription'] = val[0]['usageDescription']
setV['usageCode'] = val[0]['code']
}
if(formField === 'costCenterCode'){
setV['costcentreCode'] = val[0]['costcentreCode']
setV['costCenterType'] = val[0]['costcentreType']
}
if(formField === 'reasonCodeRequisition'){
setV['reasonCodeRequisition'] = val[0]['code']
}
if(formField === 'projectCode'){
setV['projectCode'] = val[0]['projectCode']
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
} }
}) })
} }
const clearSearchInput = (field) => { const clearSearchInput = (field) => {
@ -240,7 +256,7 @@ const clearSearchInput = (field) => {
} }
if (field == 'q3Number') { if (field == 'q3Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => { ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q1Number' || item.field == 'q1Number') { if (item.field == 'q1Number' || item.field == 'q2Number') {
item.componentProps.enterSearch = true item.componentProps.enterSearch = true
item.componentProps.isSearchList = true item.componentProps.isSearchList = true
item.componentProps.disabled = false item.componentProps.disabled = false

267
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -17,6 +17,16 @@ import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main' import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data' import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -53,6 +63,233 @@ export const ScrapRequestMain = useCrudSchemas(
isForm: false, isForm: false,
isSearch: true isSearch: true
}, },
{
label: '领用代码',
field: 'usageCode',
sort: 'custom',
table: {
width: 150
},
isTableForm:false,
isForm: false,
isTable:false,
},
{
label: '领用描述',
field: 'usageDescription',
sort: 'custom',
isTableForm:false,
isForm: false,
isTable:false,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择领用描述',
searchField: 'usageDescription',
searchTitle: '领用描述信息',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage
}
}
},
{
label: '成本中心代码',
field: 'costCenterCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码',
searchField: 'costcentreCode',
searchTitle: '成本中心代码',
searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage,
verificationParams: [{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '成本中心类型',
field: 'costCenterType',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
},
{
label: '领用原因代码',
field: 'reasonCodeRequisition',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成领用原因代码',
searchField: 'code',
searchTitle: '领用原因代码',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类
searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息',
searchField: 'projectCode',
searchTitle: '领用原因代码',
searchAllSchemas: QadProject.allSchemas,
searchPage: QadProjectApi.getQadProjectPage,
verificationParams: [{
key: 'projectCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本
searchField: 'projectCode', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'projectCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '工作中心',
field: 'workCenter',
sort: 'custom',
table: {
width: 150
},
},
{
label: '订单号',
field: 'orderNumber',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: 'Q1通知单号', label: 'Q1通知单号',
field: 'q1Number', field: 'q1Number',
@ -557,11 +794,27 @@ export const ScrapRequestMain = useCrudSchemas(
]) ])
) )
const validateOrderNumber = (rule: any, value: any, callback: any) => {
if (!value) {
callback();
} else {
const codeReg = /^[0-9]+$/
if (codeReg.test(value)) {
callback()
} else {
callback(new Error('订单号只能是数字'))
}
}
}
//表单校验 //表单校验
export const ScrapRequestMainRules = reactive({ export const ScrapRequestMainRules = reactive({
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }
], ],
orderNumber: [
{ validator: validateOrderNumber, trigger: 'change' }
],
autoCommit: [ autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' } { required: true, message: '请选择是否自动提交', trigger: 'change' }
], ],
@ -579,7 +832,19 @@ export const ScrapRequestMainRules = reactive({
], ],
fromWarehouseCode:[ fromWarehouseCode:[
{required: true,message: '请选择从仓库代码',trigger: 'change' } {required: true,message: '请选择从仓库代码',trigger: 'change' }
] ],
usageDescription:[
{ required: true, message: '请选择领用描述', trigger: 'blur' }
],
costCenterCode: [
{ required: true, message: '请输入成本中心代码', trigger: 'blur' }
],
costCenterType: [
{ required: true, message: '请输入成本中心类型', trigger: 'blur' }
],
reasonCodeRequisition: [
{ required: true, message: '请输入领用原因代码', trigger: 'blur' }
],
}) })
/** /**

2
src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/sparepartReturnRecordMain.data.ts

@ -42,7 +42,7 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 180 width: 180
}, },
isSearch: true isSearch: false
}, },
{ {
label: '申请时间', label: '申请时间',

6
src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue

@ -90,7 +90,7 @@
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/unplannedreceipt-request-main/import" :importTemplateData="importTemplateData" <ImportForm ref="importFormRef" url="/wms/unplannedreceipt-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> @success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template> </template>
@ -252,7 +252,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:unplannedreceipt-request-main:create'}), // 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.defaultExportBtn({hasPermi:'wms:unplannedreceipt-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
@ -615,6 +615,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
dataType:'2',
templateUrl: '', templateUrl: '',
templateTitle: `${route.meta.title}】导入模版.xlsx` templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
@ -692,5 +693,6 @@ const tableFormSelectOnBlur = (field, val, row, index) => {
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await UnplannedreceiptRequestMainApi.importTemplate() importTemplateData.templateUrl = await UnplannedreceiptRequestMainApi.importTemplate()
console.log(344,importTemplateData)
}) })
</script> </script>

62
src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts

@ -801,12 +801,66 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
isSearch: true, isSearch: true,
isMainValue: false isMainValue: false
},{ },{
key: 'businessTypeCode', key: 'type',
value: 'UnplannedReceipt', value: 'ZZBZ',
action: '==', action: '!=',
isSearch: true, isSearch: true,
isMainValue: false isMainValue: false
} },{
key: 'type',
value: 'WGJ',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'Q&J',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'PRHC',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'ONBZ',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'DZYH',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'CCP',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'BCP',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'QJ',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'YCL',
action: '!=',
isSearch: true,
isMainValue: false
}
], ],
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',

1
src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts

@ -45,6 +45,7 @@ export const TransferissueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts

@ -48,6 +48,7 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts

@ -53,6 +53,7 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts

@ -66,6 +66,7 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts

@ -115,6 +115,7 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 180 width: 180
}, },
isSearch: true,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {

2
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -734,10 +734,12 @@ const submitForm = async (formType, submitData) => {
if(flag){ if(flag){
return return
} }
data.dataType='1'
formRef.value.formLoading = true formRef.value.formLoading = true
await UnplannedreceiptRequestMainApi.createUnplannedreceiptRequestMain(data) await UnplannedreceiptRequestMainApi.createUnplannedreceiptRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
data.dataType='1'
formRef.value.formLoading = true formRef.value.formLoading = true
await UnplannedreceiptRequestMainApi.updateUnplannedreceiptRequestMain(data) await UnplannedreceiptRequestMainApi.updateUnplannedreceiptRequestMain(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))

22
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -208,13 +208,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else { } else {
row['batch'] = '000000' row['batch'] = '000000'
} }
// HL-4885 @ @
// tableform // tableform
// TODO: tableFormColumns 10 20 20 // TODO: tableFormColumns 10 20 20
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { // ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty' && val[0]['qty'] > 0) { // if(item.field == 'qty' && val[0]['qty'] > 0) {
item.tableForm.max = val[0]['qty'] // item.tableForm.max = val[0]['qty']
} // }
}) // })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {
// //
@ -257,12 +258,13 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
} else { } else {
setV['batch'] = '000000' setV['batch'] = '000000'
} }
// HL-4885 @ @
// tableform // tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { // ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty' && val[0]['qty'] > 0) { // if(item.field == 'qty' && val[0]['qty'] > 0) {
item.tableForm.max = val[0]['qty'] // item.tableForm.max = val[0]['qty']
} // }
}) // })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {
setV['workStationCode'] = val[0]['code'] setV['workStationCode'] = val[0]['code']

28
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['uom'] = val[0]['uom']
row['inventoryStatus'] = val[0]['inventoryStatus'] row['inventoryStatus'] = val[0]['inventoryStatus']
row['qty'] = Number(val[0]['qty']) row['qty'] = Number(val[0]['qty'])
// HL-4885 @ @
// tableform // tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => { // ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => {
if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) { // if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) {
item.tableForm.max = Number(val[0]['qty']) // item.tableForm.max = Number(val[0]['qty'])
} // }
// if(item.field == 'batch') { // // if(item.field == 'batch') {
// item.tableForm.disabled = false // // item.tableForm.disabled = false
// } // // }
}) // })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {
val.forEach(item=>{ val.forEach(item=>{
@ -238,12 +239,13 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['uom'] = val[0]['uom'] setV['uom'] = val[0]['uom']
setV['inventoryStatus'] = val[0]['inventoryStatus'] setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['qty'] = val[0]['qty'] setV['qty'] = val[0]['qty']
// HL-4885 @ @
// tableform // tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { // ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty') { // if(item.field == 'qty') {
item.tableForm.max = val[0]['qty'] // item.tableForm.max = val[0]['qty']
} // }
}) // })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {
setV['workStationCode'] = val[0]['code'] setV['workStationCode'] = val[0]['code']

2
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts

@ -564,11 +564,13 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
disabled:true,
min:0, min:0,
precision: 6 precision: 6
} }
}, },
tableForm: { tableForm: {
disabled:true,
type: 'InputNumber', type: 'InputNumber',
min:0, min:0,
precision: 6 precision: 6

17
src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue

@ -325,7 +325,6 @@ const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item)) tableData.value = tableData.value.filter(item => !selection.includes(item))
} }
//true0 //true0
const flag = ref()
// //
const submitForm = async (formType, submitData) => { const submitForm = async (formType, submitData) => {
@ -334,15 +333,20 @@ const submitForm = async (formType, submitData) => {
data.id = data.masterId data.id = data.masterId
} }
data.subList = tableData.value // data.subList = tableData.value //
let flag = false
data.subList.forEach(item => { data.subList.forEach(item => {
item.toBatch = item.fromBatch item.toBatch = item.fromBatch
item.fromLocationCode = data.fromLocationCode item.fromLocationCode = data.fromLocationCode
item.toLocationCode = data.toLocationCode item.toLocationCode = data.toLocationCode
item.toInventoryStatus = data.toInventoryStatus item.toInventoryStatus = data.toInventoryStatus
if(item.checkQty>0&&Number(item.qty)==0){
if(item.qty == 0){ message.error(`${item['itemCode']}数量不能为0!`)
message.error(`数量不能为0!`) flag = true
flag.value = true return;
}
if(item.checkQty>0&&item.qty<0){
message.error(`${item['itemCode']}数量不能小于0!`)
flag = true
return; return;
} }
}) })
@ -351,7 +355,7 @@ const submitForm = async (formType, submitData) => {
message.warning('从库位和到库位不能相同') message.warning('从库位和到库位不能相同')
return return
} }
if(flag.value){ if(flag){
formRef.value.formLoading = false formRef.value.formLoading = false
return return
} }
@ -387,6 +391,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['fromInventoryStatus'] = item['inventoryStatus'] newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['origin_fromLocationCode'] = item['locationCode'] newRow['origin_fromLocationCode'] = item['locationCode']
newRow['uom'] = item['uom'] newRow['uom'] = item['uom']
newRow['checkQty'] = item['qty'] // HL-5524
newRow['qty'] = item['qty'] newRow['qty'] = item['qty']
if(item['packingNumber']&&item['packingNumber'].length>0){ if(item['packingNumber']&&item['packingNumber'].length>0){
newRow['packUnit'] = item['packUnit'] newRow['packUnit'] = item['packUnit']

4
src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts

@ -411,14 +411,14 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 0, // min: 0,
precision: 6 precision: 6
} }
}, },
tableForm: { tableForm: {
disabled: false, disabled: false,
type: 'InputNumber', type: 'InputNumber',
min: 0, // min: 0,
precision: 6 precision: 6
} }
}, },

20
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue

@ -44,6 +44,7 @@
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber" fieldTableColumn="fromPackingNumber"
:includeCollectionTable="true"
@success="getList" @success="getList"
:rules="InventorymoveRequestMainRules" :rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas" :formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -90,6 +91,7 @@ import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDe
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as LocationApi from '@/api/wms/location' import * as LocationApi from '@/api/wms/location'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import dayjs from 'dayjs'
// //
defineOptions({ name: 'InventorymoveRequestMain' }) defineOptions({ name: 'InventorymoveRequestMain' })
@ -615,6 +617,24 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { 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 = [] // tableData.value = [] //
formRef.value.open(type, row) formRef.value.open(type, row)
} }

3
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts

@ -584,7 +584,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
}, },
tableForm:{ tableForm:{
multiple:true, multiple:true,
isInpuFocusShow: true, // 开启查询弹窗 disabled:true,
isInpuFocusShow: false, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号', searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber', searchField: 'packingNumber',
searchTitle: '库存余额信息', searchTitle: '库存余额信息',

16
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({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainInspectRequestBtn({hide:row.inspectRequestFlag == "FALSE" }),// defaultButtons.mainInspectRequestBtn({hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainListPointBtn(null), // defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListRecoveryBtn(null), //
] ]
} }
@ -207,8 +208,11 @@ const buttonTableClick = async (val, row) => {
handleCreateInspectRequest(row.number) handleCreateInspectRequest(row.number)
} else if (val == 'point') { // } else if (val == 'point') { //
labelPrint(row) labelPrint(row)
} else if (val == 'recovery') { //
labelRecovery(row)
} }
} }
const BASE_URL = getJmreportBaseUrl() const BASE_URL = getJmreportBaseUrl()
// //
const searchTableRef = ref() const searchTableRef = ref()
@ -241,6 +245,18 @@ const labelPrint = async (row) => {
}) })
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) 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) => { const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => {
console.log('批量打印',val) console.log('批量打印',val)

2
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts

@ -742,7 +742,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
isDetail: false, isDetail: false,
isForm: false , isForm: false ,
table: { table: {
width: 220, width: 280,
fixed: 'right' fixed: 'right'
}, },
isTableForm:true, isTableForm:true,

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

File diff suppressed because it is too large

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

@ -1,6 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as WorkshopApi from '@/api/wms/workshop' import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
@ -26,7 +26,7 @@ import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/prod
import * as BomApi from '@/api/wms/bom' import * as BomApi from '@/api/wms/bom'
import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data' import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data'
import * as SupplieritemApi from '@/api/wms/supplieritem' import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
@ -36,21 +36,21 @@ const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize:10, pageSize: 10,
pageNo:1, pageNo: 1,
code:'ProductReceiptRequest' code: 'ProductReceiptRequest'
} }
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{} const requestsettingData = data?.list[0] || {}
// 获取当前操作人的部门 // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
const userStore = useUserStore() const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到 // id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept] const userDeptArray: any = [userDept]
/** /**
* @returns {Array} * @returns {Array}
@ -74,7 +74,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string', dictClass: 'string',
isSearch: true, isSearch: true,
isTable: true, isTable: true,
isForm:false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -95,7 +95,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isSearch: true, isSearch: true,
isForm: false, isForm: false,
isTable:true, isTable: true,
}, },
{ {
label: '车间代码', label: '车间代码',
@ -151,7 +151,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请填写车间代码!', message: '请填写车间代码!',
@ -172,12 +172,12 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请填写车间代码!', message: '请填写车间代码!',
isMainValue: true isMainValue: true
}], }],
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -266,7 +266,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
isForm: false isForm: false
}, },
{ {
@ -276,7 +276,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
isForm: false, isForm: false,
}, },
{ {
@ -288,7 +288,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
isForm: false, isForm: false,
}, },
{ {
@ -340,7 +340,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'}, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
@ -382,7 +382,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'}, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
@ -417,7 +417,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '部门', label: '部门',
field: 'departmentCode', field: 'departmentCode',
sort: 'custom', sort: 'custom',
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
}, },
@ -452,7 +452,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'}, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
@ -477,7 +477,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isTable: false, isTable: false,
isForm:false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -498,7 +498,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isTable: false, isTable: false,
isForm:false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -519,7 +519,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isTable: false, isTable: false,
isForm:false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -596,7 +596,7 @@ export const ProductreceiptRequestMainRules = reactive({
directCreateRecord: [ directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
], ],
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
}) })
@ -613,7 +613,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
isTableForm: false, isTableForm: false,
tableForm:{ tableForm: {
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', searchListPlaceholder: '请选择生产线代码',
searchField: 'code', searchField: 'code',
@ -624,7 +624,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请填写车间代码!', message: '请填写车间代码!',
@ -644,7 +644,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请填写车间代码!', message: '请填写车间代码!',
@ -660,27 +660,26 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
multiple: true, enterSearch: true,
disabled:true, isInpuFocusShow: true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
searchAllSchemas: Workstation.allSchemas, searchAllSchemas: Workstation.allSchemas,
searchPage: WorkstationApi.getWorkstationPage, searchPage: WorkstationApi.getWorkstationPage,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法 isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -693,8 +692,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch:true, enterSearch: true,
isSearchList: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
@ -704,12 +703,12 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -741,6 +740,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}], }],
isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -783,8 +783,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true,
isTable:false, isTable: false,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
@ -807,7 +807,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
dictClass: 'string', dictClass: 'string',
isTable: false, isTable: false,
sort: 'custom', sort: 'custom',
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -819,7 +819,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'woNumber', field: 'woNumber',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -831,7 +831,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'woLine', field: 'woLine',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -843,7 +843,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'packQty', field: 'packQty',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -864,7 +864,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
// dictClass: 'string', // dictClass: 'string',
isTable: false, isTable: false,
sort: 'custom', sort: 'custom',
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -876,7 +876,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'toOwnerCode', field: 'toOwnerCode',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -888,7 +888,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 180 width: 180
}, },
@ -903,13 +903,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
sortTableDefault:1003, sortTableDefault: 1003,
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
// enterSearch:true, // enterSearch:true,
isInpuFocusShow: true, disabled: true,
multiple: true,
isInpuFocusShow: false,
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '生产线物料关系信息', searchTitle: '生产线物料关系信息',
@ -919,12 +921,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: ProductionlineitemApi.getProductionLineCodelistByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'itemCode', key: 'itemCode',
action: '==', action: '==',
@ -948,12 +953,12 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationParams: [{ verificationParams: [{
key: 'itemCode', key: 'itemCode',
action: '==', action: '==',
@ -972,7 +977,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:1004, sortTableDefault: 1004,
tableForm: { tableForm: {
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本 searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
@ -981,11 +986,11 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key:'productItemCode', key: 'productItemCode',
value:'itemCode', value: 'itemCode',
message: '请填写物料代码!', message: '请填写物料代码!',
isMainValue: true isMainValue: true
},{ }, {
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
@ -1001,11 +1006,11 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key:'productItemCode', key: 'productItemCode',
value:'itemCode', value: 'itemCode',
message: '请填写物料代码!', message: '请填写物料代码!',
isMainValue: true isMainValue: true
},{ }, {
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
@ -1017,7 +1022,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '批次', label: '批次',
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
sortTableDefault:1006, sortTableDefault: 1006,
table: { table: {
width: 150 width: 150
}, },
@ -1026,7 +1031,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物料名称', label: '物料名称',
field: 'itemName', field: 'itemName',
sort: 'custom', sort: 'custom',
sortTableDefault:1005, sortTableDefault: 1005,
table: { table: {
width: 150 width: 150
}, },
@ -1036,7 +1041,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
{ {
label: '物料描述1', label: '物料描述1',
field: 'itemDesc1', field: 'itemDesc1',
hiddenInMain:true, hiddenInMain: true,
isTable: false, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
@ -1048,7 +1053,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
{ {
label: '物料描述2', label: '物料描述2',
field: 'itemDesc2', field: 'itemDesc2',
hiddenInMain:true, hiddenInMain: true,
isTable: false, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
@ -1060,7 +1065,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
{ {
label: '项目代码', label: '项目代码',
field: 'projectCode', field: 'projectCode',
hiddenInMain:true, hiddenInMain: true,
isTable: false, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
@ -1073,7 +1078,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '数量', label: '数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
sortTableDefault:1006, sortTableDefault: 1006,
table: { table: {
width: 150 width: 150
}, },
@ -1095,7 +1100,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'uom', field: 'uom',
dictType: DICT_TYPE.UOM, dictType: DICT_TYPE.UOM,
dictClass: 'string', dictClass: 'string',
sortTableDefault:1007, sortTableDefault: 1007,
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
@ -1114,7 +1119,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
detail: { detail: {
dateFormat: 'YYYY-MM-DD' dateFormat: 'YYYY-MM-DD'
}, },
sortTableDefault:1008, sortTableDefault: 1008,
sort: 'custom', sort: 'custom',
table: { table: {
width: 180 width: 180
@ -1126,7 +1131,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'}, style: { width: '100%' },
type: 'date', type: 'date',
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
valueFormat: 'x', valueFormat: 'x',
@ -1136,7 +1141,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
{ {
label: '过期日期', label: '过期日期',
field: 'expireDate', field: 'expireDate',
hiddenInMain:true, hiddenInMain: true,
isTable: false, isTable: false,
formatter: dateFormatter2, formatter: dateFormatter2,
detail: { detail: {
@ -1150,14 +1155,14 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
// type: 'FormDate', // type: 'FormDate',
// valueFormat: 'x', // valueFormat: 'x',
// }, // },
tableForm:{ tableForm: {
type: 'slot', type: 'slot',
disabled: true disabled: true
}, },
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'}, style: { width: '100%' },
type: 'date', type: 'date',
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
valueFormat: 'x', valueFormat: 'x',
@ -1172,13 +1177,13 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true,
}, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
formatter: dateFormatter, formatter: dateFormatter,
sortTableDefault:1009, sortTableDefault: 1009,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
@ -1189,7 +1194,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'}, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
@ -1202,7 +1207,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '创建者', label: '创建者',
field: 'creator', field: 'creator',
sort: 'custom', sort: 'custom',
sortTableDefault:1010, sortTableDefault: 1010,
table: { table: {
width: 150 width: 150
}, },
@ -1213,7 +1218,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '最后更新时间', label: '最后更新时间',
field: 'updateTime', field: 'updateTime',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -1225,7 +1230,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'}, style: { width: '100%' },
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
@ -1238,7 +1243,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '最后更新者', label: '最后更新者',
field: 'updater', field: 'updater',
sort: 'custom', sort: 'custom',
hiddenInMain:true, hiddenInMain: true,
isTable: false, isTable: false,
table: { table: {
width: 150 width: 150
@ -1248,15 +1253,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}, },
{ {
label: '操作', label: '操作',
hiddenInMain:true, hiddenInMain: true,
field: 'action', field: 'action',
isDetail: false, isDetail: false,
isForm: false , isForm: false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
}, },
isTableForm:false, isTableForm: false,
} }
])) ]))
@ -1287,7 +1292,7 @@ export const ProductreceiptRequestDetailRules = reactive({
productionLineCode: [ productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' } { required: true, message: '请选择生产线代码', trigger: 'change' }
], ],
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
}) })
@ -1641,7 +1646,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
disabled: true disabled: true
// isInpuFocusShow: true, // isInpuFocusShow: true,
// searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
@ -1663,14 +1668,14 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'supplierCode', // 查询弹窗赋值字段 searchField: 'supplierCode', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题 searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition:[{ searchCondition: [{
key: 'itemCode', key: 'itemCode',
value: 'itemCode', value: 'itemCode',
message: '请填写物料代码!', message: '请填写物料代码!',
@ -1914,7 +1919,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm: { tableForm: {
enterSearch:true, enterSearch: true,
disabled: true, disabled: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择包装', searchListPlaceholder: '请选择包装',
@ -1983,7 +1988,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm: { tableForm: {
enterSearch:true, enterSearch: true,
disabled: true, disabled: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择包装', searchListPlaceholder: '请选择包装',
@ -2014,7 +2019,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
}, },
form: { form: {
componentProps: { componentProps: {
disabled:true disabled: true
} }
}, },
tableForm: { tableForm: {

15
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue

@ -236,6 +236,7 @@ const butttondata = (row,$index) => {
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainPutawayRequestCpBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// defaultButtons.mainPutawayRequestCpBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),//
defaultButtons.mainListPointBtn(null), // defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListRecoveryBtn(null), //
] ]
} }
@ -247,6 +248,8 @@ const buttonTableClick = async (val, row) => {
handleCreateInspectRequest(row.number) handleCreateInspectRequest(row.number)
}else if (val == 'putawayRequest') { // }else if (val == 'putawayRequest') { //
handleCreatePutawayRequest(row.number) handleCreatePutawayRequest(row.number)
} else if (val == 'recovery') { //
labelRecovery(row)
} }
} }
/** 生成到货检验申请按钮操作 */ /** 生成到货检验申请按钮操作 */
@ -274,9 +277,19 @@ const handleCreatePutawayRequest = async (number:string) => {
tableObject.loading = false tableObject.loading = false
} }
} }
const labelRecovery = async (row) => {
try {
await message.confirm(t('ts.确认撤销报工吗?'))
let resType = await ProductreceiptRecordMainApi.handleRecoveryProductreceiptRecord(row)
message.success(t('ts.确认撤销报工成功'))
} catch {
} finally {
tableObject.loading = false
}
}
const searchTableRef = ref() const searchTableRef = ref()
const labelType = ref('') // const labelType = ref('') //
const labelPrint = async (row) => { const labelPrint = async (row) => {
console.log(7777,row); console.log(7777,row);
tableObject.loading = true tableObject.loading = true

84
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -43,7 +43,7 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="workStationCode" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductreceiptRequestMainRules" :rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas" :formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -152,6 +152,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom"; import * as BomApi from "@/api/wms/bom";
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop' import * as WorkshopApi from '@/api/wms/workshop'
import * as ConfigApi from '@/api/infra/config'
// //
defineOptions({ name: 'ProductreceiptRequestMainA' }) defineOptions({ name: 'ProductreceiptRequestMainA' })
@ -212,38 +213,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['packUnit'] = val[0]['packUnit'] row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty'] row['packQty'] = val[0]['packQty']
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
}else if (formField == 'itemCode') { } else if (formField == 'itemCode') {
if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){ if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){
message.warning(`物料${val[0]['itemCode']}已经存在`) message.warning(`物料${val[0]['itemCode']}已经存在`)
return return
} }
row['uom'] = val[0]['uom'] const index1 = 0
row['produceDate'] = dayjs().valueOf() setTableFormsValues(val, index1)
row[formField] = val[0][searchField] } else{
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow.batch = formatTime(new Date(), 'yyyyMMdd')
tableData.value.push(newRow)
})
}else{
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }
} else { } else {
@ -261,6 +238,33 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
}) })
} }
const setTableFormsValues = async (val, index1) => {
if (index1 <= val.length - 1) {
const newRow = JSON.parse(JSON.stringify({ ...tableFormKeys, ...val[index1] }))
newRow['itemCode'] = val[index1]['itemCode']
newRow['uom'] = val[0]['uom']
newRow['produceDate'] = dayjs().valueOf()
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC'
}
await BomApi.getBomPage(param1).then((res) => {
console.log(res)
if (res?.list?.length > 0) {
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
console.log(tableData.value)
index1++
setTableFormsValues(val, index1)
}
}
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => { nextTick(() => {
@ -810,18 +814,18 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
message.error('创建标签失败') message.error('创建标签失败')
}) })
} }
const getDefaultWorkshopCode = async ()=>{ const getDefaultWorkshopCode = async () => {
let res = await WorkshopApi.getWorkshopPage({ const data = await ConfigApi.getConfigPage({
available: "TRUE" 'key':'assembleProductreceiptWorkshopCode',
'pageNo':1,
'pageSize':10
}) })
if(res&&res.list.length>0){ if(data&&data.list&&data.list.length>0){
if(res.list.find(item=>item.code=='PRC')){ ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => { if (itemColumns.field == 'workshopCode') {
if(itemColumns.field == 'workshopCode') { itemColumns.value = data.list[0]['value']
itemColumns.value = 'PRA' }
} })
})
}
} }
} }
/** 初始化 **/ /** 初始化 **/

42
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

@ -670,27 +670,26 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
multiple: true, enterSearch: true,
disabled:true, isInpuFocusShow: true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
searchAllSchemas: Workstation.allSchemas, searchAllSchemas: Workstation.allSchemas,
searchPage: WorkstationApi.getWorkstationPage, searchPage: WorkstationApi.getWorkstationPage,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法 isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -703,7 +702,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
@ -713,7 +713,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
@ -750,6 +750,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}], }],
isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -760,9 +761,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}], // 失去焦点校验参数 }], // 失去焦点校验参数
}, },
form: { form: {
enterSearch: true,
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择工序代码', searchListPlaceholder: '请选择工序代码',
searchField: 'code', searchField: 'code',
@ -912,13 +913,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
sortTableDefault: 1003,
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:1003, tableForm: {
tableForm:{
// enterSearch:true, // enterSearch:true,
isInpuFocusShow: true, disabled: true,
multiple: true,
isInpuFocusShow: false,
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '生产线物料关系信息', searchTitle: '生产线物料关系信息',
@ -928,12 +931,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: ProductionlineitemApi.getProductionLineCodelistByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'itemCode', key: 'itemCode',
action: '==', action: '==',
@ -957,12 +963,12 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationParams: [{ verificationParams: [{
key: 'itemCode', key: 'itemCode',
action: '==', action: '==',

31
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -59,7 +59,21 @@
@tableSelectionDelete="tableSelectionDelete" @tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
/> >
<template v-slot="{ row }">
<el-date-picker
v-bind:modelValue="
row['expireTime']
? addDay(row['produceDate'], row['expireTime'])
: dayjs('2099-12-31').valueOf()
"
:clearable="true"
style="width: 100%"
:disabled="true"
:placeholder="t('ts.选择日期')"
/>
</template>
</BasicForm>
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
@ -142,9 +156,12 @@ import {
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts' } from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import dayjs from 'dayjs'
import { addDay } from '@/utils/formatTime'
// //
// //
//
defineOptions({ name: 'ProductreceiptRequestMain' }) defineOptions({ name: 'ProductreceiptRequestMain' })
const message = useMessage() // const message = useMessage() //
@ -221,6 +238,12 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
row['bomVersion'] = res.list[0].version row['bomVersion'] = res.list[0].version
} }
}) })
//
row['produceDate'] = dayjs().valueOf()
if(res.length>0){
row['expireTime'] = res[0]['expireTime']
}
}else if(formField == 'workStationCode'){ }else if(formField == 'workStationCode'){
// //
val.forEach(item=>{ val.forEach(item=>{
@ -595,7 +618,13 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){ if(data.masterId){
data.id = data.masterId data.id = data.masterId
} }
data.subList = tableData.value // data.subList = tableData.value //
tableData.value.forEach((row, index) => {
row['expireDate'] = row['expireTime']
? addDay(row['produceDate'], row['expireTime']).valueOf()
: dayjs('2099-12-31').valueOf()
})
if(data.subList.find(item => (item.qty <= 0))) { if(data.subList.find(item => (item.qty <= 0))) {
message.warning('数量必须大于0') message.warning('数量必须大于0')
return return

3
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts

@ -1238,7 +1238,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 180 width: 180
}, },
tableForm: { tableForm: {
type: 'FormDate', type: 'slot',
disabled: true,
valueFormat: 'x', valueFormat: 'x',
}, },
form: { form: {

2
src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts

@ -57,7 +57,7 @@ export const ProductredressRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '生产线代码', label: '生产线代码',
field: 'productionLineCode', field: 'productionlineCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/purchasereceiptRecordMain.data.ts

@ -145,6 +145,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

4
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue

@ -534,6 +534,10 @@ const getSearchTableData = async (number,isEnter=false)=>{
item.width = item.table?.width || 150 item.width = item.table?.width || 150
}) })
tableData.value = [] tableData.value = []
if(tableObject.tableList.length==0){
message.error(`此订单${number}已存在M类型申请的数据`)
return
}
updateTableData(tableObject.tableList) updateTableData(tableObject.tableList)
const itemCodes = [] const itemCodes = []
tableObject.tableList.forEach(row=>{ tableObject.tableList.forEach(row=>{

1
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts

@ -140,6 +140,7 @@ export const PurchasereturnJobMain = useCrudSchemas(
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

4
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts

@ -431,7 +431,7 @@ export const PurchasereturnRecordMain = useCrudSchemas(
table: { table: {
width: 150 width: 150
}, },
isTable: false isTable: true
}, },
{ {
label: '操作', label: '操作',
@ -744,7 +744,7 @@ export const PurchasereturnRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
hiddenInMain: true, hiddenInMain: true,
isSearch: false isSearch: false
}, },
{ {
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',

5
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts

@ -92,6 +92,7 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -901,7 +902,7 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true disabled: true
} }
}, },
{ {
label: '供应商计量数量', label: '供应商计量数量',
field: 'supplierQty', field: 'supplierQty',
@ -1119,7 +1120,7 @@ export const PurchasereceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isTableForm:true, isTableForm:true,
}, },
])) ]))
//表单校验 //表单校验

1
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts

@ -108,6 +108,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

21
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -527,26 +527,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '送达日期',
field: 'deliveryDate',
table: {
width: 180
},
formatter: dateFormatter2,
sortTableDefault:2,
form: {
component: 'DatePicker',
componentProps: {
type: 'date',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
detail: {
dateFormat: 'YYYY-MM-DD'
},
},
{ {
label: '采购订单号', label: '采购订单号',
field: 'poNumber', field: 'poNumber',

14
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue

@ -510,15 +510,15 @@ const blurOne = (oneRow, twoRow) => {
if (!twoRow.xNumber) { if (!twoRow.xNumber) {
twoRow.qtyOne = '' twoRow.qtyOne = ''
} }
// if (parseFloat(twoRow.xNumber) > parseFloat(oneRow.otherNumber)) { if (parseFloat(twoRow.xNumber) > parseFloat(oneRow.otherNumber)) {
// message.warning('' + oneRow.otherNumber + '') message.warning('每托箱个数最多' + oneRow.otherNumber + '箱')
// twoRow.xNumber = oneRow.otherNumber twoRow.xNumber = oneRow.otherNumber
// twoRow.children = [] twoRow.children = []
// twoRow.qtyOne = parseFloat(twoRow.xNumber) * parseFloat(oneRow.packQty) twoRow.qtyOne = parseFloat(twoRow.xNumber) * parseFloat(oneRow.packQty)
// } }
twoRow.qtyOne = parseFloat(twoRow.xNumber) twoRow.qtyOne = parseFloat(twoRow.xNumber)
? accuracyFun.multiply(parseFloat(twoRow.xNumber), parseFloat(oneRow.packQty)) ? accuracyFun.multiply(parseFloat(twoRow.xNumber), parseFloat(oneRow.packQty))
: '' : ''
// let num = 0 // let num = 0
// oneRow.packageList.forEach((item) => { // oneRow.packageList.forEach((item) => {
// num += parseFloat(item.xNumber) || 0 // num += parseFloat(item.xNumber) || 0

18
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -12,6 +12,22 @@ import * as ItemPackageApi from '@/api/wms/itempackage/index'
import {validateInteger} from '@/utils/validator' import {validateInteger} from '@/utils/validator'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
const PurchasePlanDetailSchemas = {...PurchasePlanDetail.allSchemas}
if(PurchasePlanDetailSchemas?.tableColumns){
PurchasePlanDetailSchemas.tableColumns.splice(2, 0, {
label: '送达日期',
field: 'deliveryDate',
table: {
width: 180
},
width: 180,
formatter: dateFormatter2,
sortTableDefault:2
});
}
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize: 10, pageSize: 10,
@ -107,7 +123,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本 searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段 searchField: 'number', // 查询弹窗赋值字段
searchTitle: '要货计划信息', // 查询弹窗标题 searchTitle: '要货计划信息', // 查询弹窗标题
searchAllSchemas: PurchasePlanDetail.allSchemas, // 查询弹窗所需类 searchAllSchemas: PurchasePlanDetailSchemas, // 查询弹窗所需类
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, // 查询弹窗所需分页方法 searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [
{ {

8
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

@ -1102,7 +1102,7 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive<CrudSchem
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务审批时间', label: '财务审批时间',
@ -1137,7 +1137,7 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive<CrudSchem
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务过账日期', label: '财务过账日期',
@ -1170,7 +1170,7 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive<CrudSchem
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '备注', label: '备注',
@ -1205,7 +1205,7 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive<CrudSchem
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
// { // {
// label: '创建时间', // label: '创建时间',

8
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -1408,7 +1408,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务审批时间', label: '财务审批时间',
@ -1443,7 +1443,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务过账日期', label: '财务过账日期',
@ -1476,7 +1476,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '备注', label: '备注',
@ -1510,7 +1510,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },

8
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts

@ -1423,7 +1423,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务审批时间', label: '财务审批时间',
@ -1458,7 +1458,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务过账日期', label: '财务过账日期',
@ -1491,7 +1491,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '备注', label: '备注',
@ -1526,7 +1526,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
// { // {
// label: '创建时间', // label: '创建时间',

Loading…
Cancel
Save