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) => {
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'" />
</template>
</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: '明细',
prop: 'TableForm'
},{
label: '汇总',
prop: 'CollectionTable'
}]" 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
ref="tableFormRef"
class="w-[100%]"
@ -123,7 +123,7 @@
</template>
</TableForm>
</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
:tableFields="tableAllSchemas.tableFormColumns"
:tableData="tableData"
@ -135,7 +135,7 @@
@handleDeleteTable="handleDeleteTable"
/>
</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
:tableFields="tableAllSchemas?tableAllSchemas.tableFormColumns:[]"
:tableData="tableData"
@ -369,7 +369,12 @@ const props = defineProps({
isCheckStrictly:{
type:Boolean,
default:false
}
},
// true ; false
includeCollectionTable:{
type:Boolean,
default:false
},
})
const { t } = useI18n() //

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

@ -16,7 +16,8 @@
outFile +
'&extend=' + extend +
'&fromInventoryStatus=' + fromInventoryStatus +
'&toInventoryStatus=' + toInventoryStatus
'&toInventoryStatus=' + toInventoryStatus +
dataType
"
:auto-upload="false"
:disabled="formLoading"
@ -229,6 +230,9 @@ const props = defineProps({
}
})
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 mode = ref(props.mode) //.1
const updateIsDisable = ref(props.updateIsDisable) //,

16
src/locales/en-US.ts

@ -615,11 +615,11 @@ export default {
code:'Code',
name:'Name',
},
ts: {
:'Code',
:'All',
@ -1126,7 +1126,7 @@ export default {
2:'Please input package specification2',
2:'Please input package quantity2',
:'submit for approval',
// 系统管理:'system management',
// 系统管理:'system management',
// 基础设施:'infrastructure',
// 报表管理:'report manager',
// 报表:'statement',
@ -1280,9 +1280,9 @@ export default {
:'Rule configuration',
:'Please enter a contact number',
:'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':'个',
free_library_bits_or_total_library_bits:'空闲库位数/总库位数',
slack_stock_warning:'呆滞库存预警',
package_number:'包装号',
@ -1277,6 +1277,7 @@ export default {
:'规则配置',
:'请输入联系电话',
:'请选择范围',
'确认撤销报工吗?':"确认撤销报工吗?",
},
}

12
src/utils/disposition/defaultButtons.ts

@ -1054,6 +1054,18 @@ export function mainListPointBtn(option: any) {
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) {
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-form-item prop="password">
<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-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px" v-if="needCode">
@ -173,6 +173,14 @@
// verify.value.show()
// }
// }
const passwordEnter = ()=>{
if(!needCode.value){
handleLogin()
return
}else{
getCode()
}
}
function getCode() {
if(!needCode.value){
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) => {
if (val.indexOf(row.isStaging) > -1) {
@ -283,7 +291,9 @@ const butttondata = (row) => {
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListPackageBtn(null), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) //
defaultButtons.mainListPlanCheckQualityReportBtn({
hide: isShowMainButton3(row)
}) //
]
}
const listTableRef = ref()

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

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

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

@ -15,16 +15,16 @@ const userStore = useUserStore()
// 表单校验
export const Q1Rules = reactive({
customerCode: [required],
costCode: [required],
itemCode: [required],
qty: [required],
code: [required],
priority: [required],
claimAmount: [required],
claimReason: [required],
claimTime: [required],
handleTime: [required]
itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }],
customerCode: [{ required: true, message: '请选择客户代码', trigger: 'change' }],
qty: [{ required: true, message: '请输入数量', trigger: 'change' }],
claimAmount: [{ required: true, message: '请输入索赔金额', trigger: 'change' }],
code: [{ required: true, message: '请选择缺陷代码', trigger: 'change' }],
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
costCode: [{ required: true, message: '请选择选择成本中心代码', trigger: 'change' }],
claimTime: [{ required: true, message: '请选择选择索赔日期', trigger: 'change' }],
handleTime: [{ required: true, message: '请选择选择处理时间', trigger: 'change' }],
claimReason: [{ required: true, message: '请选择选择索赔原因', trigger: 'change' }]
})
export const Q1 = useCrudSchemas(
@ -40,62 +40,6 @@ export const Q1 = useCrudSchemas(
fixed: 'left'
}
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
},
isSearch: true
},
{
label: '物料代码',
field: 'itemCode',
@ -119,12 +63,6 @@ export const Q1 = useCrudSchemas(
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
message: '请填写客户代码!',
isMainValue: true
}
],
verificationParams: [
@ -141,76 +79,107 @@ export const Q1 = useCrudSchemas(
}
},
{
label: '数量',
field: 'qty',
label: '物料名称',
field: 'itemName',
sort: 'custom',
isTable: true,
dictClass: 'string',
isSearch: false,
table: {
width: 150
isTable: true,
tableForm: {
disabled: true
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
disabled: true
}
}
},
{
label: '单位',
field: 'uom',
label: '客户代码',
field: 'customerCode',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select',
disabled: true
},
form: {
component: 'Select',
componentProps: {
disabled: true
options: [],
optionsAlias: {
labelField: 'customerCode',
valueField: 'customerCode'
},
filterable: true
}
}
},
{
label: '编码',
field: 'code',
label: '客户名称',
field: 'customerName',
sort: 'custom',
dictType: DICT_TYPE.QMS_Q1_CODE,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isTable: true,
isSearch: false,
table: {
width: 180
width: 150
},
tableForm: {
type: 'Select'
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
}
},
{
label: '优先级',
field: 'priority',
label: '单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: false,
isTable: true,
tableForm: {
type: 'Select'
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '负责用户',
field: 'responUser',
label: '标准成本价格',
field: 'standardCostPrice',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
value: userStore.getUser.nickname,
min: 0,
precision: 6,
disabled: true
}
}
@ -232,6 +201,33 @@ export const Q1 = useCrudSchemas(
}
}
},
{
label: '缺陷编码',
field: 'code',
sort: 'custom',
dictType: DICT_TYPE.QMS_Q1_CODE,
dictClass: 'string',
isSearch: false,
isTable: true,
table: {
width: 180
},
tableForm: {
type: 'Select'
}
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictClass: 'string',
isSearch: false,
isTable: false,
tableForm: {
type: 'Select'
}
},
{
label: '成本中心代码',
@ -303,6 +299,19 @@ export const Q1 = useCrudSchemas(
}
}
},
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false,
isForm: true,
form: {
componentProps: {
value: userStore.getUser.nickname,
disabled: true
}
}
},
{
label: '处理时间',
field: 'handleTime',
@ -325,6 +334,24 @@ export const Q1 = useCrudSchemas(
}
}
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '描述',
field: 'desc',
@ -392,8 +419,17 @@ export const Q1 = useCrudSchemas(
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '操作',

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

@ -55,6 +55,7 @@
:apiCreate="Q2Api.createQ2"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
@onChange="onChange"
/>
<!-- 详情 -->
@ -77,7 +78,11 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import { formatDate } from '@/utils/formatTime'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import * as SupplierApi from '@/api/wms/supplier'
import * as ItembasicApi from '@/api/wms/itembasic'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
@ -93,37 +98,126 @@ routeName.value = route.name
const tableColumns = ref(Q2.allSchemas.tableColumns)
//
const priceObj = ref()
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
nextTick(async () => {
const setV = {}
if (formField == 'supplierCode') {
setV['itemCode'] = ''
const supplierParams = {
by: 'ASC',
filters: [{ column: 'code', action: '==', value: val[0].supplierCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
supplierParams.isSearch = true
SupplierApi.getSupplierPage(supplierParams).then((res) => {
if (res.list?.length > 0) {
formRef.setValues({
supplierName: res.list[0].name
})
}
})
}
if (formField == 'itemCode') {
setV['uom'] = val[0]['supplierUom']
}
// if (formField == 'q1Number') {
// console.log(123)
// setV['q1Number'] = val[0]['number']
// }
if (formField == 'purchaseReceiptNumber') {
setV['wmsQty'] = val[0]['qty']
}
if (formField == 'q1Number') {
//Q1
let list = []
val.forEach((item) => {
list.push(item[searchField])
setV['SupplierCode'] = ''
setV['SupplierName'] = ''
setV['itemName'] = ''
setV['standardCostPrice'] = ''
setV['qty'] = ''
setV['claimAmount'] = ''
setV['uom'] = val[0].supplierUom
const supplieritemParams = {
by: 'ASC',
filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode}],
pageNo: 1,
pageSize: 500,
sort: ''
}
supplieritemParams.isSearch = true
SupplieritemApi.getSupplieritemPage(supplieritemParams).then((res) => {
if (res.list?.length > 0) {
formRef.formModel.supplierCode = res.list[0].supplierCode
formRef.formModel.supplierName = res.list[0].supplierName
Q2.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.options = res.list
}
})
}
})
const itembasicParams = {
by: 'ASC',
filters: [{ column: 'code', action: '==', value: val[0].itemCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
itembasicParams.isSearch = true
ItembasicApi.getItembasicPage(itembasicParams).then((res) => {
if (res.list?.length > 0) {
formRef.setValues({
itemName: res.list[0].name
})
}
})
const params2 = {
by: 'ASC',
filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
params2.isSearch = true
StdcostpriceApi.getStdcostpricePage(params2).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
formRef.setValues({
standardCostPrice: priceObj.value.price
})
}
})
setV[formField] = list.join(',')
formRef.setValues(setV)
} else {
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
const onChange = (field, e) => {
if (field == 'qty') {
basicFormRef.value.formRef.formModel.claimAmount = (
parseFloat(basicFormRef.value.formRef.formModel.qty) * parseFloat(basicFormRef.value.formRef.formModel.standardCostPrice)
).toFixed(6)
basicFormRef.value.formRef.formModel.summaryAmount = (
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6)
}
if (field == 'otherclaimAmount') {
basicFormRef.value.formRef.formModel.summaryAmount = (
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6)
}
if (field == 'supplierCode') {
basicFormRef.value.formRef.formModel.supplierName = ''
const paramsCustomer = {
by: 'ASC',
filters: [{ column: 'code', action: '==', value: basicFormRef.value.formRef.formModel.supplierCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
paramsCustomer.isSearch = true
SupplierApi.getSupplierPage(paramsCustomer).then((res) => {
if (res.list?.length > 0) {
basicFormRef.value.formRef.formModel.supplierName = res.list[0].name
}
})
}
}
//
const updataTableColumns = (val) => {
tableColumns.value = val

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

@ -49,70 +49,14 @@ export const Q2 = useCrudSchemas(
fixed: 'left'
}
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
table: {
width: 175
},
form: {
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 190
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
@ -124,12 +68,6 @@ export const Q2 = useCrudSchemas(
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
@ -150,32 +88,51 @@ export const Q2 = useCrudSchemas(
}
},
{
label: '数量',
field: 'qty',
label: '物料名称',
field: 'itemName',
sort: 'custom',
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
dictClass: 'string',
isSearch: false,
table: {
width: 150
isTable: true,
tableForm: {
disabled: true
},
form: {
component: 'InputNumber',
component: 'Select',
componentProps: {
min: 0,
precision: 2
options: [],
optionsAlias: {
labelField: 'supplierCode',
valueField: 'supplierCode'
},
filterable: true
}
}
},
{
label: '单位',
field: 'uom',
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select',
disabled: true
},
form: {
@ -188,7 +145,7 @@ export const Q2 = useCrudSchemas(
label: '采购收货单号',
field: 'purchaseReceiptNumber',
sort: 'custom',
isTable: false,
isTable: true,
table: {
width: 180
},
@ -228,19 +185,99 @@ export const Q2 = useCrudSchemas(
}
}
},
{
label: '索赔日期',
field: 'claimTime',
isTable: true,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '采购收货数量',
field: 'wmsQty',
label: '数量',
field: 'qty',
sort: 'custom',
isTable: true,
isSearch: false,
isForm: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
}
},
{
label: '单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '标准成本价格',
field: 'standardCostPrice',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
disabled: true
}
}
},
{
label: '索赔金额',
field: 'claimAmount',
sort: 'custom',
isTable: false,
isDetail: false
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
}
},
{
label: '编码',
label: '缺陷编码',
field: 'code',
sort: 'custom',
dictType: DICT_TYPE.QMS_Q2_CODE,
@ -254,7 +291,6 @@ export const Q2 = useCrudSchemas(
type: 'Select'
}
},
{
label: '优先级',
field: 'priority',
@ -268,26 +304,38 @@ export const Q2 = useCrudSchemas(
}
},
{
label: '负责用户',
field: 'responUser',
label: '其他索赔描述',
field: 'otherClaimDesc',
sort: 'custom',
isSearch: false,
isForm: true,
table: {
width: 120
width: '150'
},
form: {
component: 'Input',
componentProps: {}
}
},
{
label: '其他索赔金额',
field: 'otherclaimAmount',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
value: userStore.getUser.nickname,
disabled: true
min: 0,
precision: 6,
}
}
},
{
label: '索赔金额',
field: 'claimAmount',
label: '汇总金额',
field: 'summaryAmount',
sort: 'custom',
isTable: false,
isSearch: false,
table: {
width: 150
@ -296,7 +344,8 @@ export const Q2 = useCrudSchemas(
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
precision: 6,
disabled: true
}
}
},
@ -337,49 +386,6 @@ export const Q2 = useCrudSchemas(
}
}
},
{
label: '索赔日期',
field: 'claimTime',
isTable: true,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '处理时间',
field: 'handleTime',
isTable: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: 'Q1通知单号',
field: 'q1Number',
@ -424,6 +430,62 @@ export const Q2 = useCrudSchemas(
},
isSearch: true
},
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false,
isForm: true,
table: {
width: 120
},
form: {
componentProps: {
value: userStore.getUser.nickname,
disabled: true
}
}
},
{
label: '处理时间',
field: 'handleTime',
isTable: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '描述',
field: 'desc',
@ -478,6 +540,15 @@ export const Q2 = useCrudSchemas(
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '操作',
field: 'action',

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

@ -54,8 +54,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="description">
<el-input v-model="data.description" placeholder="请填写描述" />
<el-form-item label="方案描述" prop="description">
<el-input v-model="data.description" placeholder="请填写方案描述" />
</el-form-item>
</el-col>
<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',
valueFormat: 'x',
}
}
},
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
},
{
label: '创建者',
@ -173,7 +182,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -196,7 +205,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
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',
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: '创建者',

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',
sort: 'custom',
table: {

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

@ -525,11 +525,34 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
label: '创建时间',
field: 'createTime',
sort: 'custom',
isDetail: true,
isSearch: true,
isForm: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
formatter: dateFormatter,
isForm: false,
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
},
{
label: '创建者',

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -16,7 +16,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table ref="tableRef" :selection="true"
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -26,6 +27,7 @@
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows"
>
<template #number="{row}">
<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 * as EquipmentInspectionRecordMainApi from "@/api/eam/equipmentInspectionRecordMain";
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'package' })
const message = useMessage() //
@ -125,6 +127,7 @@ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -148,6 +151,8 @@ const buttonBaseClick = (val, item) => {
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val=='selection_point'){//
handleSelectionPoint()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
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) => {
// if (val.indexOf(row.status) > -1) {
@ -305,28 +359,46 @@ const formsSuccess = async (formType,data) => {
const labelType = ref('') //
const handlePoint = async (row) => {
console.log(row.packingNumber,445555555555555);
PackageApi.getBalanceToPackage(row.number).then(res => {
console.log(777,res);
if (res.productionLineCode != null) {
labelType.value = 'zz'
} else {
labelType.value = 'cg'
PackageApi.batchPrintingLable([row.number]).then(res => {
console.log('批量打印res',res);
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('包装不存在,无法打印或者是线边物料数据不生成包装!')
}
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)
})
// 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 { dateFormatter } from '@/utils/formatTime'
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}
@ -26,6 +34,138 @@ export const ScrapJobMain = useCrudSchemas(
},
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通知单号',
field: 'q1Number',

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

@ -1,6 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
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}
@ -35,6 +43,138 @@ export const ScrapRecordMain = useCrudSchemas(
},
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通知单号',
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]
}
} else {
console.log("报废出库主表")
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
if (formField == 'q1Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
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) => {
@ -240,7 +256,7 @@ const clearSearchInput = (field) => {
}
if (field == 'q3Number') {
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.isSearchList = true
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 { 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() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -53,6 +63,233 @@ export const ScrapRequestMain = useCrudSchemas(
isForm: false,
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通知单号',
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({
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
orderNumber: [
{ validator: validateOrderNumber, trigger: 'change' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
@ -579,7 +832,19 @@ export const ScrapRequestMainRules = reactive({
],
fromWarehouseCode:[
{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: {
width: 180
},
isSearch: true
isSearch: false
},
{
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" />
</template>
@ -252,7 +252,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:unplannedreceipt-request-main:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'wms:unplannedreceipt-request-main:import'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:unplannedreceipt-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:unplannedreceipt-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -615,6 +615,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
dataType:'2',
templateUrl: '',
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
@ -692,5 +693,6 @@ const tableFormSelectOnBlur = (field, val, row, index) => {
onMounted(async () => {
getList()
importTemplateData.templateUrl = await UnplannedreceiptRequestMainApi.importTemplate()
console.log(344,importTemplateData)
})
</script>

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

@ -801,12 +801,66 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
isSearch: true,
isMainValue: false
},{
key: 'businessTypeCode',
value: 'UnplannedReceipt',
action: '==',
key: 'type',
value: 'ZZBZ',
action: '!=',
isSearch: true,
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: [{
key: 'code',

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -564,11 +564,13 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min:0,
precision: 6
}
},
tableForm: {
disabled:true,
type: 'InputNumber',
min:0,
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))
}
//true0
const flag = ref()
//
const submitForm = async (formType, submitData) => {
@ -334,15 +333,20 @@ const submitForm = async (formType, submitData) => {
data.id = data.masterId
}
data.subList = tableData.value //
let flag = false
data.subList.forEach(item => {
item.toBatch = item.fromBatch
item.fromLocationCode = data.fromLocationCode
item.toLocationCode = data.toLocationCode
item.toInventoryStatus = data.toInventoryStatus
if(item.qty == 0){
message.error(`数量不能为0!`)
flag.value = true
if(item.checkQty>0&&Number(item.qty)==0){
message.error(`${item['itemCode']}数量不能为0!`)
flag = true
return;
}
if(item.checkQty>0&&item.qty<0){
message.error(`${item['itemCode']}数量不能小于0!`)
flag = true
return;
}
})
@ -351,7 +355,7 @@ const submitForm = async (formType, submitData) => {
message.warning('从库位和到库位不能相同')
return
}
if(flag.value){
if(flag){
formRef.value.formLoading = false
return
}
@ -387,6 +391,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['origin_fromLocationCode'] = item['locationCode']
newRow['uom'] = item['uom']
newRow['checkQty'] = item['qty'] // HL-5524
newRow['qty'] = item['qty']
if(item['packingNumber']&&item['packingNumber'].length>0){
newRow['packUnit'] = item['packUnit']

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

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

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

@ -44,6 +44,7 @@
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber"
:includeCollectionTable="true"
@success="getList"
:rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -90,6 +91,7 @@ import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDe
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as LocationApi from '@/api/wms/location'
import { formatDate } from '@/utils/formatTime'
import dayjs from 'dayjs'
//
defineOptions({ name: 'InventorymoveRequestMain' })
@ -615,6 +617,24 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
if(type=='create'){
InventorymoveRequestMain.allSchemas.formSchema.forEach(item =>{
if(item.field == 'fromWarehouseCode'){
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
if(item.field == 'dueTime') {
item.value = dayjs().add(1, 'hour').valueOf()
}
})
}else{
InventorymoveRequestMain.allSchemas.formSchema.forEach(item =>{
if(item.field == 'fromWarehouseCode'){
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
}
tableData.value = [] //
formRef.value.open(type, row)
}

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

@ -584,7 +584,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
},
tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
disabled:true,
isInpuFocusShow: false, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
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({hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListRecoveryBtn(null), //
]
}
@ -207,8 +208,11 @@ const buttonTableClick = async (val, row) => {
handleCreateInspectRequest(row.number)
} else if (val == 'point') { //
labelPrint(row)
} else if (val == 'recovery') { //
labelRecovery(row)
}
}
const BASE_URL = getJmreportBaseUrl()
//
const searchTableRef = ref()
@ -241,6 +245,18 @@ const labelPrint = async (row) => {
})
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
}
//
const labelRecovery = async (row) => {
try {
await message.confirm(t('ts.确认撤销报工吗?'))
tableObject.loading = true
let resType = await ProductreceiptRecordMainApi.handleRecoveryProductreceiptRecord(row)
message.success(t('ts.确认撤销报工成功'))
} catch {
} finally {
tableObject.loading = false
}
}
// --
const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => {
console.log('批量打印',val)

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

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

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

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

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

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

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

@ -59,7 +59,21 @@
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@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
@ -142,9 +156,12 @@ import {
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
import dayjs from 'dayjs'
import { addDay } from '@/utils/formatTime'
//
//
//
defineOptions({ name: 'ProductreceiptRequestMain' })
const message = useMessage() //
@ -221,6 +238,12 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
row['bomVersion'] = res.list[0].version
}
})
//
row['produceDate'] = dayjs().valueOf()
if(res.length>0){
row['expireTime'] = res[0]['expireTime']
}
}else if(formField == 'workStationCode'){
//
val.forEach(item=>{
@ -595,7 +618,13 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){
data.id = data.masterId
}
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))) {
message.warning('数量必须大于0')
return

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

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

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

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

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

@ -145,6 +145,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '运输方式',
field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom',
table: {
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
})
tableData.value = []
if(tableObject.tableList.length==0){
message.error(`此订单${number}已存在M类型申请的数据`)
return
}
updateTableData(tableObject.tableList)
const itemCodes = []
tableObject.tableList.forEach(row=>{

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

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

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

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

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

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

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

@ -108,6 +108,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '运输方式',
field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom',
table: {
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: '采购订单号',
field: 'poNumber',

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

@ -510,15 +510,15 @@ const blurOne = (oneRow, twoRow) => {
if (!twoRow.xNumber) {
twoRow.qtyOne = ''
}
// if (parseFloat(twoRow.xNumber) > parseFloat(oneRow.otherNumber)) {
// message.warning('' + oneRow.otherNumber + '')
// twoRow.xNumber = oneRow.otherNumber
// twoRow.children = []
// twoRow.qtyOne = parseFloat(twoRow.xNumber) * parseFloat(oneRow.packQty)
// }
if (parseFloat(twoRow.xNumber) > parseFloat(oneRow.otherNumber)) {
message.warning('每托箱个数最多' + oneRow.otherNumber + '箱')
twoRow.xNumber = oneRow.otherNumber
twoRow.children = []
twoRow.qtyOne = parseFloat(twoRow.xNumber) * parseFloat(oneRow.packQty)
}
twoRow.qtyOne = parseFloat(twoRow.xNumber)
? accuracyFun.multiply(parseFloat(twoRow.xNumber), parseFloat(oneRow.packQty))
: ''
: ''
// let num = 0
// oneRow.packageList.forEach((item) => {
// 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'
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 = {
pageSize: 10,
@ -107,7 +123,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '要货计划信息', // 查询弹窗标题
searchAllSchemas: PurchasePlanDetail.allSchemas, // 查询弹窗所需类
searchAllSchemas: PurchasePlanDetailSchemas, // 查询弹窗所需类
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, // 查询弹窗所需分页方法
searchCondition: [
{

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

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

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

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

Loading…
Cancel
Save