Browse Source

要货预测-更新用到的接口

deli_scp
yufei_wang 1 month ago
committed by kakilu
parent
commit
adc4628c74
  1. 8
      src/api/wms/demandforecastingMain/index.ts
  2. 154
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts
  3. 18
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue
  4. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

8
src/api/wms/demandforecastingMain/index.ts

@ -149,6 +149,14 @@ export const queryUserPlanerList = async () => {
export const querySupplierList = async (data) => {
return await request.post({ url: `/wms/demandforecasting-main/querySupplierList`,data })
}
// 供应商代码
export const queryQadSupplierList = async (data) => {
return await request.post({ url: `/wms/demandforecasting-main/queryQadSupplierList`,data })
}
// 物料代码
export const queryQadItemCodeList = async (data) => {
return await request.post({ url: `/wms/demandforecasting-main/queryQadItemCodeList`,data })
}
// 是否已读接口

154
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts

@ -4,7 +4,6 @@ import * as SupplierApi from '@/api/wms/supplier'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplier} from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
import * as PurchaseMainApi from '@/api/wms/purchaseMain'
@ -33,45 +32,156 @@ try {
/**
* @returns {Array}
*/
Supplieritem.allSchemas.searchSchema = Supplieritem.allSchemas.searchSchema.filter(item=>item.field!="allowOverShipment")
export const Supplier1 = useCrudSchemas(reactive<CrudSchema[]>([
export const Supplier2= useCrudSchemas(reactive<CrudSchema[]>([
{
label: '用户名称',
field: 'userName',
sort: 'custom',
label: '供应商代码',
field: 'supplierCode',
isSearch:true,
sort: 'custom',
},
{
label: '用户昵称',
field: 'nickName',
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
},
{
label: '供应商代码',
field: 'supplierCode',
isSearch:true,
label: '供应商简称',
field: 'shortName',
sort: 'custom',
},
{
label: '供应商名称',
field: 'supplierName',
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
},
{
label: '更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
}
]))
export const Supplieritem1 = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 180
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '物料名称',
field: 'name',
isForm:true,
form:{
componentProps:{
disabled: true
}
},
table: {
width: 180
}
},
{
label: '物料描述1',
field: 'desc1',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物料描述2',
field: 'desc2',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}
},
}
]))
export const Version = useCrudSchemas(reactive<CrudSchema[]>([
{
@ -146,7 +256,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'supplierCode', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier1.allSchemas, // 查询弹窗所需类
searchAllSchemas: Supplier2.allSchemas, // 查询弹窗所需类
searchPage: DemandforecastingMainApi.querySupplierList, // 查询弹窗所需分页方法
searchCondition: [{
key: 'planers',
@ -197,7 +307,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchAllSchemas: Supplieritem1.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPageSCP, // 查询弹窗所需分页方法
searchCondition: [{
key: 'supplierCodes',
@ -547,8 +657,8 @@ export const UpdateMain = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: t(`ts.${'填写供应商代码(填写多个供应商)'}`), // 输入框占位文本
searchField: 'supplierCode', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier1.allSchemas, // 查询弹窗所需类
searchPage: DemandforecastingMainApi.querySupplierList, // 查询弹窗所需分页方法
searchAllSchemas: Supplier2.allSchemas, // 查询弹窗所需类
searchPage: DemandforecastingMainApi.queryQadSupplierList, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
@ -582,8 +692,8 @@ export const UpdateMain = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: t(`ts.${'填写物料号(填写多个物料号)'}`), // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPageSCP, // 查询弹窗所需分页方法
searchAllSchemas: Supplieritem1.allSchemas, // 查询弹窗所需类
searchPage: DemandforecastingMainApi.queryQadItemCodeList, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',

18
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue

@ -49,7 +49,11 @@
@searchTableSuccess="searchTableSuccessUpdate"
@onChange="onChange"
:isBusiness="false"
/>
:showSearchTableQueryFields="['supplierCode','itemCode']"
:hiddenFilterBtnFields="['supplierCode','itemCode']"
>
</BasicForm>
</template>
@ -231,12 +235,12 @@ const searchFormClick = (searchData) => {
const updateFormRef = ref()
const updateHandle = ()=>{
UpdateMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'supplierCode'||item.field == 'itemCode'){
item.componentProps.enterSearch = false
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
if(item.field == 'supplierCode'||item.field == 'itemCode'){
item.componentProps.enterSearch = false
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
updateFormRef.value.open('create',null,null,t(`ts.更新要货预测`),t(`ts.更新要货预测`))
}
const onChange = (field, cur, formRef) => {

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

@ -124,7 +124,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
searchPage: PurchaseMainApi.getPurchaseMainPage,
searchCondition: [{
key: 'type',
value: 'SCHEDULE',
value: 'SCHEDULE,OUTSOURCING',
isMainValue: false
},{
key: 'available',

Loading…
Cancel
Save