增加批次商品选择
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { FormTypes } from '@/utils/JEditableTableUtil'
|
||||
import {findBySelectSup,findBySelectCus,findBySelectRetail,getMaterialByBarCode,findStockByDepotAndBarCode,getAccount,getPersonByNumType} from '@/api/api'
|
||||
import {findBySelectSup,findBySelectCus,findBySelectRetail,getMaterialByBarCode,findStockByDepotAndBarCode,getAccount,
|
||||
getPersonByNumType, getBatchNumberList} from '@/api/api'
|
||||
import { getAction,putAction } from '@/api/manage'
|
||||
import { getMpListShort, getNowFormatDateTime } from "@/utils/util"
|
||||
import Vue from 'vue'
|
||||
@@ -213,7 +214,7 @@ export const BillModalMixin = {
|
||||
onValueChange(event) {
|
||||
let that = this
|
||||
const { type, row, column, value, target } = event
|
||||
let param,operNumber,unitPrice,taxUnitPrice,allPrice,taxRate,taxMoney,taxLastMoney
|
||||
let param,batchNumber,operNumber,unitPrice,taxUnitPrice,allPrice,taxRate,taxMoney,taxLastMoney
|
||||
switch(column.key) {
|
||||
case "depotId":
|
||||
if(row.barCode){
|
||||
@@ -274,6 +275,27 @@ export const BillModalMixin = {
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "batchNumber":
|
||||
batchNumber = value-0
|
||||
getBatchNumberList({name:'', depotId: row.depotId, barCode: row.barCode, batchNumber: batchNumber}).then((res) => {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data && res.data.rows) {
|
||||
let info = res.data.rows[0]
|
||||
operNumber = info.totalNum
|
||||
taxRate = row.taxRate-0 //税率
|
||||
unitPrice = row.unitPrice-0 //单价
|
||||
taxUnitPrice = row.taxUnitPrice-0
|
||||
allPrice = (unitPrice*operNumber).toFixed(2)-0
|
||||
taxMoney =((taxRate*0.01)*allPrice).toFixed(2)-0
|
||||
taxLastMoney = (allPrice + taxMoney).toFixed(2)-0
|
||||
target.setValues([{rowKey: row.id, values: {expirationDate: info.expirationDateStr, operNumber: operNumber,
|
||||
allPrice: allPrice, taxMoney: taxMoney, taxLastMoney: taxLastMoney}}])
|
||||
target.recalcAllStatisticsColumns()
|
||||
that.autoChangePrice(target)
|
||||
}
|
||||
}
|
||||
})
|
||||
break;
|
||||
case "operNumber":
|
||||
operNumber = value-0
|
||||
taxRate = row.taxRate-0 //税率
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '7%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '8%', type: FormTypes.popupJsh, multi: true,
|
||||
{ title: '条码', key: 'barCode', width: '8%', type: FormTypes.popupJsh, kind: 'material', multi: true,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '6%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
{ title: '仓库名称', key: 'depotId', width: '7%', type: FormTypes.select, placeholder: '请选择${title}', options: [],
|
||||
allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '条码', key: 'barCode', width: '8%', type: FormTypes.popupJsh, multi: true,
|
||||
{ title: '条码', key: 'barCode', width: '8%', type: FormTypes.popupJsh, kind: 'material', multi: true,
|
||||
validateRules: [{ required: true, message: '${title}不能为空' }]
|
||||
},
|
||||
{ title: '名称', key: 'name', width: '6%', type: FormTypes.input, readonly: true },
|
||||
@@ -187,8 +187,8 @@
|
||||
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.input, readonly: true },
|
||||
{ title: '单位', key: 'unit', width: '4%', type: FormTypes.input, readonly: true },
|
||||
{ title: '序列号', key: 'snList', width: '5%', type: FormTypes.input },
|
||||
{ title: '批号', key: 'batchNumber', width: '5%', type: FormTypes.input },
|
||||
{ title: '有效期', key: 'expirationDate',width: '7%', type: FormTypes.input },
|
||||
{ title: '批号', key: 'batchNumber', width: '7%', type: FormTypes.popupJsh, kind: 'batch', multi: false },
|
||||
{ title: '有效期', key: 'expirationDate',width: '5%', type: FormTypes.input, readonly: true },
|
||||
{ title: '多属性', key: 'sku', width: '4%', type: FormTypes.input, readonly: true },
|
||||
{ title: '原数量', key: 'preNumber', width: '4%', type: FormTypes.input, readonly: true },
|
||||
{ title: '已入库', key: 'finishNumber', width: '4%', type: FormTypes.input, readonly: true },
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
{title: '序列号',align: "left", dataIndex: 'serialNumber', width: 180},
|
||||
{title: '商品条码', align: "center",dataIndex: 'materialCode', width: 120},
|
||||
{title: '商品名称', align: "center",dataIndex: 'materialName', width: 120},
|
||||
{title: '仓库', align: "center", dataIndex: 'depotName', width: 150},
|
||||
{
|
||||
title: '单据编号', align: "center", dataIndex: 'depotHeadNumber', width: 150,
|
||||
scopedSlots: { customRender: 'numberCustomRender' },
|
||||
|
||||
Reference in New Issue
Block a user