Commit caa82450 by chenwq

发货单加字段

1 parent 2e01460a
......@@ -34,6 +34,7 @@ import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import DeliverAdd from './deliverAdd'
import DeliverDetail from './deliverDetail'
import { membraneTypeList } from '@/utils/constants.js'
import { defaultStatusOptions, defaultDeliveryStatusOptions, defaultPutStatusOptions, purchaseTypeList } from '@/utils/constants.js'
export default {
name: 'PurchaseOrder',
......@@ -46,7 +47,7 @@ export default {
size: 'small',
url: url,
searchForm: {
goodsType: '',
goodsType: '',
deliveryNumber: '',
deliveryCompany: '',
putStatus: '',
......@@ -155,7 +156,7 @@ export default {
fn: '入库'
},
condition: row => {
return row.putStatus == 1&&row.operatorStatus == 1||row.putStatus == 3&&row.operatorStatus == 1
return row.putStatus == 1 && row.operatorStatus == 1 || row.putStatus == 3 && row.operatorStatus == 1
},
listeners: {
click: this.handleWarehousing
......@@ -185,6 +186,21 @@ export default {
prop: 'goodsTypeName'
},
{
label: '发货数量',
prop: '',
formatter: cellValue => {
return membraneTypeList.includes(cellValue.goodsType) ? `${cellValue.purchaseNumber}卷` : `${cellValue.purchaseNumber}件`
}
},
{
label: '可用库存数量',
prop: '',
width: '120px',
formatter: cellValue => {
return cellValue.stockNum + membraneTypeList.includes(cellValue.goodsType) ? `米` : `件`
}
},
{
label: '承运单号',
prop: 'deliveryNumber',
formatter: cellValue => {
......@@ -203,7 +219,7 @@ export default {
label: '发货时间',
prop: 'deliveryDate',
formatter: cellValue => {
return cellValue.deliveryDate?dayjs(cellValue.deliveryDate).format('YYYY-MM-DD HH:mm:ss'):'--'
return cellValue.deliveryDate ? dayjs(cellValue.deliveryDate).format('YYYY-MM-DD HH:mm:ss') : '--'
}
},
{
......@@ -236,13 +252,13 @@ export default {
merchantName: [],
storeUsageList: [],
purchaseTypeList: purchaseTypeList,
goodsTypeOptions: []
goodsTypeOptions: []
}
}
},
mounted() {
this.getTypeList()
this.getTypeList()
this.$apis.purchaseShopping.getMerchantList({}).then(res => {
this.baseData.merchantName = res
this.baseData.storeUsageList = res
......@@ -253,15 +269,15 @@ export default {
methods: {
getTypeList() {
this.$apis.delivery.getTypeList({}).then(res => {
this.baseData.goodsTypeOptions = res
this.getOptionsList('showFormData', true, 'goodsType')
this.baseData.goodsTypeOptions = res
this.getOptionsList('showFormData', true, 'goodsType')
})
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.placeOrderTimeStr.length) {
params.deliveryDateStart = dayjs(this.searchForm.placeOrderTimeStr[0]).format('YYYY-MM-DD') + ' 00:00:00'
params.deliveryDateEnd = dayjs(this.searchForm.placeOrderTimeStr[1]).format('YYYY-MM-DD')+ ' 23:59:59'
params.deliveryDateEnd = dayjs(this.searchForm.placeOrderTimeStr[1]).format('YYYY-MM-DD') + ' 23:59:59'
}
delete params.placeOrderTimeStr
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!