Browse Source

计划外入库

master_hella_20240701
wangyufei 5 months ago
parent
commit
f300fbfbd5
  1. 5
      src/api/wms/businesstype/index.ts
  2. 16
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  3. 25
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

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

@ -63,3 +63,8 @@ export const exportBusinesstype = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/businesstype/get-import-template' }) return request.download({ url: '/wms/businesstype/get-import-template' })
} }
// 库存状态
export const getBusinesstypeCode = async (businessCode: string) => {
return await request.get({ url: `/wms/businesstype/getBusinesstypeCode?businessCode=` + businessCode })
}

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

@ -59,7 +59,14 @@
@submitForm="submitForm" @submitForm="submitForm"
@inputNumberChange="inputNumberChange" @inputNumberChange="inputNumberChange"
@tableFormSelectOnBlur="tableFormSelectOnBlur" @tableFormSelectOnBlur="tableFormSelectOnBlur"
/> ><template v-slot="{row}">
<el-date-picker v-bind:modelValue="row['validityDays']?addDay(row['produceDate'],row['validityDays']).format('YYYY-MM-DD'):''"
:clearable="true"
style="width: 100%"
:disabled="true"
:placeholder="t('ts.选择日期')"/>
</template>
</BasicForm>
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
@ -101,6 +108,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import dayjs from 'dayjs'
import { addDay } from '@/utils/formatTime'
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { import {
@ -192,6 +201,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else { } else {
row['itemCode'] = val[0]['code'] row['itemCode'] = val[0]['code']
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
// \
row['validityDays'] = val[0]['validityDays']
// StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']}) // StdcostpriceApi.queryStdcostpriceByItemCode({"itemCode":val[0]['code']})
// .then(res => { // .then(res => {
// row['singlePrice'] = res.price // row['singlePrice'] = res.price
@ -582,6 +593,9 @@ const tableData = ref([])
const handleAddTable = () => { const handleAddTable = () => {
let tfk = JSON.parse(JSON.stringify(tableFormKeys)) let tfk = JSON.parse(JSON.stringify(tableFormKeys))
tfk.batch = formatTime(new Date(), 'yyyyMMdd') tfk.batch = formatTime(new Date(), 'yyyyMMdd')
//
tfk['produceDate'] = dayjs().valueOf()
tfk['arriveDate'] = dayjs().valueOf()
tableData.value.push(tfk) tableData.value.push(tfk)
} }
// //

25
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

@ -22,6 +22,7 @@ import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data' import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject' import * as QadProjectApi from '@/api/wms/qadProject'
import * as BusinesstypeApi from '@/api/wms/businesstype'
const businessType = 'UnplannedReceipt' const businessType = 'UnplannedReceipt'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -43,7 +44,7 @@ const queryParams = {
// id 转str 否则form回显匹配不到 // id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept] const userDeptArray:any = [userDept]
const UnplannedReceipt = await BusinesstypeApi.getBusinesstypeCode("UnplannedReceipt")
/** /**
* @returns {Array} * @returns {Array}
*/ */
@ -872,16 +873,18 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
{ {
label: '库存状态', label: '库存状态',
field: 'inventoryStatus', field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
// dictType: DICT_TYPE.INVENTORY_STATUS,
// dictClass: 'string',
isTable: true,
table: { table: {
width: 150 width: 150
}, },
tableForm: { tableForm: {
type: 'Select' show:true,
} type: 'Select',
initOptions:UnplannedReceipt.inInventoryStatusList
},
}, },
{ {
label: '到货日期', label: '到货日期',
@ -955,10 +958,14 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
valueFormat: 'x', valueFormat: 'x',
} }
}, },
// tableForm: {
// type: 'FormDate',
// dateFormat: 'YYYY-MM-DD',
// valueFormat: 'x',
// }
tableForm: { tableForm: {
type: 'FormDate', type: 'slot',
dateFormat: 'YYYY-MM-DD', disabled:true
valueFormat: 'x',
} }
}, },
{ {

Loading…
Cancel
Save