Browse Source

增加送达日期字段修改时间窗字段值

master_hella_20240701
zhaoxuebing 9 months ago
parent
commit
6bd5cb2c3f
  1. 5
      src/api/wms/purchasePlanMain/index.ts
  2. 23
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  3. 67
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

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

@ -90,3 +90,8 @@ export const exportPurchasePlanMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/purchase-plan-main/get-import-template' })
}
// 查询要货计划策略根据供应商
export const queryPurchasePlan = async (supplierCode: string) => {
return await request.get({ url: `/wms/purchase-plan-main/queryPurchasePlan?supplierCode=` + supplierCode })
}

23
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -27,9 +27,12 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" :rules="PurchasePlanMainRules"
:formAllSchemas="PurchasePlanMain.allSchemas" :tableAllSchemas="PurchasePlanDetail.allSchemas"
:tableFormRules="PurchasePlanDetailRules" :tableData="tableData"
<BasicForm ref="formRef" @success="getList"
:rules="PurchasePlanMainRules"
:formAllSchemas="PurchasePlanMain.allSchemas"
:tableAllSchemas="PurchasePlanDetail.allSchemas"
:tableFormRules="PurchasePlanDetailRules"
:tableData="tableData"
:apiUpdate="PurchasePlanMainApi.updatePurchasePlanMain"
:apiCreate="PurchasePlanMainApi.createPurchasePlanMain"
:isBusiness="true"
@ -68,7 +71,6 @@
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import {mainListPurchasePlanModBtn} from "@/utils/disposition/defaultButtons";
//
defineOptions({ name: 'PurchasePlanMain' })
@ -108,6 +110,19 @@
setV['itemCode'] = val[0]['code']
setV['poNumber'] = val[0]['number']
setV['poLine'] = val[0]['lineNumber']
if(formField == 'supplierCode'){
setV['supplierCode'] = val[0]['code']
await PurchasePlanMainApi.queryPurchasePlan(val[0]['code']).then(res => {
let beginTime = res.beginTime
var ms = beginTime.substring(0, 2)
var me = beginTime.substring(3)
setV['beginTime'] = new Date(2024, 1, 1, Number(ms), Number(me))
let endTime = res.endTime
var ms = endTime.substring(0, 2)
var me = endTime.substring(3)
setV['endTime'] = new Date(2024, 1, 1, Number(ms), Number(me))
})
}
if (formField == 'poLine') {
setV['itemCode'] = val[0]['itemCode']
setV['uom'] = val[0]['uom']

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

@ -48,14 +48,60 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '送达日期',
field: 'deliveryDate',
table: {
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
detail: {
dateFormat: 'YYYY-MM-DD'
},
},
{
label: '时间窗口',
field: 'timeWindow',
table: {
width: 150
},
isForm: false
},
{
label: '开始时间',
field: 'beginTime',
sort: 'custom',
table: {
width: 150
},
isForm: false,
form:{
component:"TimePicker",
componentProps: {
format:"HH:mm",
}
}
},
{
label: '结束时间',
field: 'endTime',
sort: 'custom',
table: {
width: 150
},
form:{
component:"TimePicker",
componentProps: {
format:"HH:mm",
}
}
},
{
label: '仓库代码',
@ -108,24 +154,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '开始时间',
field: 'beginTime',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '结束时间',
field: 'endTime',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '自动发布',
field: 'autoPublish',

Loading…
Cancel
Save