Browse Source

Merge branch 'intex' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into intex

intex_online20250327
songguoqiang 3 weeks ago
parent
commit
10cb5686bb
  1. 11
      src/api/wms/modelDeliTime/index.ts
  2. 2
      src/utils/dict.ts
  3. 34
      src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue
  4. 63
      src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts
  5. 6
      src/views/wms/countManage/count/countConfig/countConfig.data.ts
  6. 24
      src/views/wms/countManage/count/countConfig/index.vue
  7. 4
      src/views/wms/supplierManage/supplierDeliMain/index.vue

11
src/api/wms/modelDeliTime/index.ts

@ -52,6 +52,13 @@ export const importTemplate = () => {
return request.download({ url: '/wms/model-deli-time-detail/get-import-template' })
}
// 查询受入号
export const getSupplierAddrList = async () => {
return await request.get({ url: `/wms/itembasic/getModel` })
export const getSupplierAddrList = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/itembasic/getModelSenior', data })
} else {
return await request.get({ url: `/wms/itembasic/getModel`, params})
}
}

2
src/utils/dict.ts

@ -427,5 +427,5 @@ export enum DICT_TYPE {
ISSUE_SOURCE="issue_source",//发料来源
ISSUE_PLAN_TRIAL_RESULT="issue_plan_trial_result",//备料计划试算结果
COUNT_MODE = "count_mode",//盘点模式(1:PAD盘点,2:Excel导入)
INVENTORY_MODE = "inventory_mode",
}

34
src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue

@ -146,24 +146,27 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
tableData.value.push(tfk)
})
}
const setV = {}
setV[formField] = val[0][searchField]
if (formField == 'supplierCode') {
if (formField == 'modelShow') {
setV['modelShow'] = val.map(item=>item.model).join(',')
}
if (formField == 'supplierCode') {
setV['supplierCode'] = val[0].code
setV['supplierName'] = val[0].name
console.log(ModelDeliTime.allSchemas.formSchema)
const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code)
ModelDeliTime.allSchemas.formSchema.forEach(item => {
if(item.field == 'modelShow'){
item.componentProps.options = options.map(item=> {
return {
label: item,
value:item
}
})
}
})
// const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code)
// ModelDeliTime.allSchemas.formSchema.forEach(item => {
// if(item.field == 'modelShow'){
// item.componentProps.options = options.map(item=> {
// return {
// label: item,
// value:item
// }
// })
// }
// })
}
formRef.setValues(setV)
})
@ -179,7 +182,8 @@ const submitForm = async (formType, submitData) => {
if (data.masterId) {
data.id = data.masterId
}
data.model =data.modelShow.join(',')
data.model =data.modelShow
// data.model =data.modelShow.join(',')
data.yearAndMonth =data.yearAndMonthShow.join(',')
data.subList = tableData.value //
data.subList.forEach((item) => {
@ -265,7 +269,7 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
getModelCode()
// getModelCode()
openForm('create')
} else if (val == 'import') { //
handleImport()

63
src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts

@ -6,6 +6,8 @@ import { Supplier } from '../supplier/supplier.data'
import { DeliTimeWms } from '../DeliTimeWms/deliTimeWms.data'
import * as DeliTimeWmsApi from '@/api/wms/deliTimeWms'
import { fa } from 'element-plus/es/locale'
import * as modelDeliTimeApi from '@/api/wms/modelDeliTime'
// 表单校验
export const ModelDeliTimeDetailRules = reactive({
@ -48,6 +50,15 @@ function getMonthArr() {
return dateArr;
}
export const ModelList = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '受入号',
field: 'model',
sort: 'custom',
isSearch: true,
},
]))
export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
// {
// label: '供应商代码',
@ -100,17 +111,48 @@ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
isTable: false,
isDetail: false,
// form: {
// component: 'Select',
// componentProps: {
// multiple: true,
// collapseTags: true,
// collapseTagsTooltip: true,
// maxCollapseTags: "2",
// optionsAlias: {
// labelField: 'label',
// valueField: 'value'
// }
// }
// }
form: {
component: 'Select',
// labelMessage: '信息提示说明!!!',
componentProps: {
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
maxCollapseTags: "2",
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
multiple:true,
disabled:true,
enterSearch: false,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择受入号', // 输入框占位文本
searchField: 'model', // 查询弹窗赋值字段
searchTitle: '受入号', // 查询弹窗标题
searchAllSchemas: ModelList.allSchemas, // 查询弹窗所需类
searchPage: modelDeliTimeApi.getSupplierAddrList, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
],
verificationParams: [
{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -131,6 +173,7 @@ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'Select',
api: () => getMonthArr(),
value:[],
componentProps: {
multiple: true,
collapseTags: true,
@ -216,6 +259,8 @@ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
}
]))
export const ModelDeliTimeDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编号',

6
src/views/wms/countManage/count/countConfig/countConfig.data.ts

@ -6,8 +6,8 @@ import * as ItembasicApi from '@/api/wms/itembasic'
// 表单校验
export const CountConfigRules = reactive({
itemCode: [required],
available: [required],
concurrencyStamp: [required],
countType: [required],
conversionRate: [required],
})
export const CountConfig = useCrudSchemas(reactive<CrudSchema[]>([
@ -117,6 +117,8 @@ export const CountConfig = useCrudSchemas(reactive<CrudSchema[]>([
label: '盘点模式',
field: 'countType',
sort: 'custom',
dictType: DICT_TYPE.INVENTORY_MODE,
dictClass: 'string',
table: {
width: 180
},

24
src/views/wms/countManage/count/countConfig/index.vue

@ -54,7 +54,14 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="CountConfig.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/count-config/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm ref="importFormRef"
url="/wms/count-config/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:appendIsDisable="true"
:mode="3"
/>
</template>
<script setup lang="ts">
@ -158,6 +165,21 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if(type=='create'){
CountConfig.allSchemas.formSchema.forEach(item =>{
if(item.field == "itemCode"){
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
})
} else if(type=='update'){
CountConfig.allSchemas.formSchema.forEach(item =>{
if(item.field == "itemCode"){
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
}
basicFormRef.value.open(type, row)
}

4
src/views/wms/supplierManage/supplierDeliMain/index.vue

@ -164,7 +164,9 @@ const { tableObject, tableMethods } = useTable({
//
const { getList, setSearchParams } = tableMethods
const getListExecute = () => {
tableObject.params.yearAndMonth=formatDate(new Date(),'YYYY-MM')
if(!tableObject.params.yearAndMonth){
tableObject.params.yearAndMonth=formatDate(new Date(),'YYYY-MM')
}
getList()
tableObject.tableList.forEach(item=>item.isOpen = false)
}

Loading…
Cancel
Save