|
@@ -114,7 +114,7 @@
|
|
|
>
|
|
|
<template #buttonAfter>
|
|
|
<a-row
|
|
|
- v-if="rowCanEdit"
|
|
|
+ v-if="false"
|
|
|
:gutter="24"
|
|
|
style="float: left; padding-bottom: 5px"
|
|
|
data-step="4"
|
|
@@ -315,6 +315,20 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
+ <a-row class="form-row" :gutter="24">
|
|
|
+ <a-col :lg="6" :md="12" :sm="24">
|
|
|
+ <a-form-item
|
|
|
+ :labelCol="labelCol"
|
|
|
+ :wrapperCol="wrapperCol"
|
|
|
+ label="凭证图片"
|
|
|
+ data-step="11"
|
|
|
+ data-title="附件"
|
|
|
+ data-intro="可以上传与单据相关的图片、文档,支持多个文件"
|
|
|
+ >
|
|
|
+ <j-image-upload v-model="imageList" bizPath="material" text="上传图片" isMultiple></j-image-upload>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
</a-form>
|
|
|
</a-spin>
|
|
|
<many-account-modal ref="manyAccountModalForm" @ok="manyAccountModalFormOk"></many-account-modal>
|
|
@@ -349,6 +363,7 @@ import { getMpListShort, changeListFmtMinus, handleIntroJs } from '@/utils/util'
|
|
|
import JUpload from '@/components/jeecg/JUpload'
|
|
|
import JDate from '@/components/jeecg/JDate'
|
|
|
import Vue from 'vue'
|
|
|
+import JImageUpload from '@/components/jeecg/JImageUpload.vue'
|
|
|
|
|
|
export default {
|
|
|
name: 'PurchaseInModal',
|
|
@@ -370,6 +385,7 @@ export default {
|
|
|
functional: true,
|
|
|
render: (h, ctx) => ctx.props.vnodes,
|
|
|
},
|
|
|
+ JImageUpload,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -383,6 +399,7 @@ export default {
|
|
|
prefixNo: 'CGRK',
|
|
|
depositStatus: false,
|
|
|
fileList: [],
|
|
|
+ imageList: [],
|
|
|
rowCanEdit: true,
|
|
|
model: {},
|
|
|
labelCol: {
|
|
@@ -399,44 +416,55 @@ export default {
|
|
|
loading: false,
|
|
|
dataSource: [],
|
|
|
columns: [
|
|
|
+ // {
|
|
|
+ // title: '仓库名称',
|
|
|
+ // key: 'depotId',
|
|
|
+ // width: '8%',
|
|
|
+ // type: FormTypes.select,
|
|
|
+ // placeholder: '请选择${title}',
|
|
|
+ // options: [],
|
|
|
+ // allowSearch: true,
|
|
|
+ // disabled: true,
|
|
|
+ // validateRules: [{ required: true, message: '${title}不能为空' }],
|
|
|
+ // },
|
|
|
{
|
|
|
- title: '仓库名称',
|
|
|
- key: 'depotId',
|
|
|
- width: '8%',
|
|
|
- type: FormTypes.select,
|
|
|
- placeholder: '请选择${title}',
|
|
|
- options: [],
|
|
|
- allowSearch: true,
|
|
|
- validateRules: [{ required: true, message: '${title}不能为空' }],
|
|
|
- },
|
|
|
- {
|
|
|
- title: '条码',
|
|
|
- key: 'barCode',
|
|
|
+ title: '批次号',
|
|
|
+ key: 'batchNumber',
|
|
|
width: '12%',
|
|
|
type: FormTypes.popupJsh,
|
|
|
kind: 'material',
|
|
|
multi: true,
|
|
|
+ newBatch: true,
|
|
|
+
|
|
|
validateRules: [{ required: true, message: '${title}不能为空' }],
|
|
|
},
|
|
|
- { title: '名称', key: 'name', width: '10%', type: FormTypes.normal },
|
|
|
- { title: '规格', key: 'standard', width: '9%', type: FormTypes.normal },
|
|
|
+ { title: '名称', key: 'name', width: '7%', type: FormTypes.normal },
|
|
|
+ { title: '规格', key: 'standard', width: '6%', type: FormTypes.normal },
|
|
|
+
|
|
|
+ { title: '生产日期', key: 'productionDate', width: '9%', type: FormTypes.normal, disabled: true },
|
|
|
+ { title: '保质期', key: 'expiryNum', width: '6%', type: FormTypes.normal },
|
|
|
+ { title: '商品条码', key: 'barCode', width: '6%', type: FormTypes.normal },
|
|
|
+ { title: '仓库名', key: 'depotId', width: '6%', type: FormTypes.select, disabled: true },
|
|
|
+ { title: '仓库货架', key: 'position', width: '6%', type: FormTypes.normal },
|
|
|
+ { title: '包装规格', key: 'unitName', width: '6%', type: FormTypes.input },
|
|
|
+
|
|
|
{ title: '型号', key: 'model', width: '9%', type: FormTypes.normal },
|
|
|
{ title: '颜色', key: 'color', width: '5%', type: FormTypes.normal },
|
|
|
{ title: '品牌', key: 'brand', width: '6%', type: FormTypes.normal },
|
|
|
{ title: '制造商', key: 'mfrs', width: '6%', type: FormTypes.normal },
|
|
|
{ title: '扩展信息', key: 'materialOther', width: '5%', type: FormTypes.normal },
|
|
|
{ title: '库存', key: 'stock', width: '5%', type: FormTypes.normal },
|
|
|
- { title: '单位', key: 'unit', width: '4%', type: FormTypes.normal },
|
|
|
+ { title: '单位', key: 'unit', width: '4%', type: FormTypes.select, options: [] },
|
|
|
+ { title: '单位id', key: 'unitId', width: '4%', type: FormTypes.hidden },
|
|
|
{ title: '序列号', key: 'snList', width: '12%', type: FormTypes.popupJsh, kind: 'snAdd', multi: true },
|
|
|
- { title: '批号', key: 'batchNumber', width: '7%', type: FormTypes.input },
|
|
|
{ title: '有效期', key: 'expirationDate', width: '7%', type: FormTypes.date },
|
|
|
{ title: '多属性', key: 'sku', width: '9%', type: FormTypes.normal },
|
|
|
{ title: '原数量', key: 'preNumber', width: '4%', type: FormTypes.normal },
|
|
|
{ title: '已入库', key: 'finishNumber', width: '4%', type: FormTypes.normal },
|
|
|
{
|
|
|
- title: '数量',
|
|
|
+ title: '入库数量',
|
|
|
key: 'operNumber',
|
|
|
- width: '4%',
|
|
|
+ width: '5%',
|
|
|
type: FormTypes.inputNumber,
|
|
|
statistics: true,
|
|
|
validateRules: [{ required: true, message: '${title}不能为空' }],
|
|
@@ -453,6 +481,25 @@ export default {
|
|
|
statistics: true,
|
|
|
},
|
|
|
{ title: '价税合计', key: 'taxLastMoney', width: '7%', type: FormTypes.inputNumber, statistics: true },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '实际入库数量',
|
|
|
+ key: 'actualQuantityInStorage',
|
|
|
+ width: '9%',
|
|
|
+ type: FormTypes.inputNumber,
|
|
|
+ validateRules: [{ required: true, message: '实际入库数量不能为空' }],
|
|
|
+ },
|
|
|
+ { title: '入库差异', key: 'warehousingVariance', width: '9%', type: FormTypes.input },
|
|
|
+ { title: '入库差异原因', key: 'reasonOfDifference', width: '9%', type: FormTypes.input },
|
|
|
+ {
|
|
|
+ title: '入库人',
|
|
|
+ key: 'warehousingUser',
|
|
|
+ width: '9%',
|
|
|
+ type: FormTypes.input,
|
|
|
+ validateRules: [{ required: true, message: '入库人不能为空' }],
|
|
|
+ },
|
|
|
+ { title: '入库时间', key: 'warehousingTime', width: '9%', type: FormTypes.date },
|
|
|
+
|
|
|
{ title: '备注', key: 'remark', width: '6%', type: FormTypes.input },
|
|
|
{ title: '关联id', key: 'linkId', width: '5%', type: FormTypes.hidden },
|
|
|
],
|
|
@@ -489,10 +536,10 @@ export default {
|
|
|
this.billStatus = '0'
|
|
|
this.currentSelectDepotId = ''
|
|
|
this.rowCanEdit = true
|
|
|
- this.materialTable.columns[1].type = FormTypes.popupJsh
|
|
|
+ this.materialTable.columns[0].type = FormTypes.popupJsh
|
|
|
this.changeColumnHide()
|
|
|
this.changeFormTypes(this.materialTable.columns, 'snList', 0)
|
|
|
- this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
|
|
+ // this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)
|
|
|
this.changeFormTypes(this.materialTable.columns, 'expirationDate', 0)
|
|
|
this.changeFormTypes(this.materialTable.columns, 'preNumber', 0)
|
|
|
this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0)
|
|
@@ -500,13 +547,14 @@ export default {
|
|
|
this.depositStatus = false
|
|
|
this.addInit(this.prefixNo)
|
|
|
this.fileList = []
|
|
|
+ this.imageList = []
|
|
|
this.$nextTick(() => {
|
|
|
handleIntroJs(this.prefixNo, 1)
|
|
|
})
|
|
|
} else {
|
|
|
if (this.model.linkNumber) {
|
|
|
this.rowCanEdit = false
|
|
|
- this.materialTable.columns[1].type = FormTypes.normal
|
|
|
+ this.materialTable.columns[0].type = FormTypes.normal
|
|
|
}
|
|
|
this.model.operTime = this.model.operTimeStr
|
|
|
if (this.model.deposit) {
|
|
@@ -530,6 +578,8 @@ export default {
|
|
|
this.manyAccountBtnStatus = false
|
|
|
}
|
|
|
this.fileList = this.model.fileName
|
|
|
+ this.imageList = this.model.voucherPicture
|
|
|
+
|
|
|
this.$nextTick(() => {
|
|
|
this.form.setFieldsValue(
|
|
|
pick(
|
|
@@ -595,10 +645,16 @@ export default {
|
|
|
} else {
|
|
|
billMain.fileName = ''
|
|
|
}
|
|
|
+ if (this.imageList && this.imageList.length > 0) {
|
|
|
+ billMain.voucherPicture = this.imageList
|
|
|
+ } else {
|
|
|
+ billMain.voucherPicture = ''
|
|
|
+ }
|
|
|
if (this.model.id) {
|
|
|
billMain.id = this.model.id
|
|
|
}
|
|
|
billMain.status = this.billStatus
|
|
|
+
|
|
|
return {
|
|
|
info: JSON.stringify(billMain),
|
|
|
rows: JSON.stringify(detailArr),
|
|
@@ -637,6 +693,7 @@ export default {
|
|
|
this.changeColumnShow(info)
|
|
|
}
|
|
|
this.materialTable.dataSource = listEx
|
|
|
+
|
|
|
///给优惠后金额重新赋值
|
|
|
allTaxLastMoney = allTaxLastMoney ? allTaxLastMoney : 0
|
|
|
let discount = 0
|