给商品增加图片上传功能,单据增加附件,优化付款收款单

This commit is contained in:
季圣华
2021-07-02 00:52:30 +08:00
parent 9af01678a7
commit ae00d062b2
31 changed files with 566 additions and 252 deletions

View File

@@ -80,6 +80,13 @@
<a-col :lg="6" :md="12" :sm="24">
</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="附件">
<j-upload v-model="fileList" bizPath="financial"></j-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
@@ -89,11 +96,13 @@
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
import JUpload from '@/components/jeecg/JUpload'
import JDate from '@/components/jeecg/JDate'
export default {
name: "AdvanceInModal",
mixins: [JEditableTableMixin, FinancialModalMixin],
components: {
JUpload,
JDate
},
data () {
@@ -105,6 +114,7 @@
addDefaultRowNum: 1,
visible: false,
model: {},
fileList:[],
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
@@ -156,12 +166,14 @@
editAfter() {
if (this.action === 'add') {
this.addInit("SYF")
this.fileList = []
} else {
this.model.billTime = this.model.billTimeStr
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark',
'totalPrice', 'discountMoney', 'changeAmount'))
});
this.fileList = this.model.fileName
// 加载子表数据
let params = {
headerId: this.model.id
@@ -180,6 +192,9 @@
totalPrice += item.eachAmount-0
}
billMain.totalPrice = totalPrice
if(this.fileList && this.fileList.length > 0) {
billMain.fileName = this.fileList
}
if(this.model.id){
billMain.id = this.model.id
}

View File

@@ -74,6 +74,13 @@
<a-col :lg="6" :md="12" :sm="24">
</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="附件">
<j-upload v-model="fileList" bizPath="financial"></j-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
@@ -83,11 +90,13 @@
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
import JUpload from '@/components/jeecg/JUpload'
import JDate from '@/components/jeecg/JDate'
export default {
name: "GiroModal",
mixins: [JEditableTableMixin, FinancialModalMixin],
components: {
JUpload,
JDate
},
data () {
@@ -99,6 +108,7 @@
addDefaultRowNum: 1,
visible: false,
model: {},
fileList:[],
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
@@ -156,12 +166,14 @@
editAfter() {
if (this.action === 'add') {
this.addInit("ZZ")
this.fileList = []
} else {
this.model.billTime = this.model.billTimeStr
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark',
'accountId', 'changeAmount'))
});
this.fileList = this.model.fileName
// 加载子表数据
let params = {
headerId: this.model.id
@@ -181,6 +193,9 @@
}
billMain.totalPrice = 0-totalPrice
billMain.changeAmount = 0-billMain.changeAmount
if(this.fileList && this.fileList.length > 0) {
billMain.fileName = this.fileList
}
if(this.model.id){
billMain.id = this.model.id
}

View File

@@ -63,8 +63,8 @@
</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="账户">
<a-select placeholder="选择收账户" v-decorator="[ 'accountId', validatorRules.accountId ]" :dropdownMatchSelectWidth="false">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="账户">
<a-select placeholder="选择收账户" v-decorator="[ 'accountId', validatorRules.accountId ]" :dropdownMatchSelectWidth="false">
<a-select-option v-for="(item,index) in accountList" :key="index" :value="item.id">
{{ item.name }}
</a-select-option>
@@ -72,8 +72,8 @@
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="金额">
<a-input placeholder="请输入收金额" v-decorator.trim="[ 'changeAmount', validatorRules.changeAmount ]" />
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="金额">
<a-input placeholder="请输入收金额" v-decorator.trim="[ 'changeAmount', validatorRules.changeAmount ]" />
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
@@ -81,6 +81,13 @@
<a-col :lg="6" :md="12" :sm="24">
</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="附件">
<j-upload v-model="fileList" bizPath="financial"></j-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
@@ -90,11 +97,13 @@
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
import JUpload from '@/components/jeecg/JUpload'
import JDate from '@/components/jeecg/JDate'
export default {
name: "ItemInModal",
mixins: [JEditableTableMixin, FinancialModalMixin],
components: {
JUpload,
JDate
},
data () {
@@ -106,6 +115,7 @@
addDefaultRowNum: 1,
visible: false,
model: {},
fileList:[],
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
@@ -143,12 +153,12 @@
},
accountId:{
rules: [
{ required: true, message: '请选择收账户!' }
{ required: true, message: '请选择收账户!' }
]
},
changeAmount:{
rules: [
{ required: true, message: '请输入收金额!' }
{ required: true, message: '请输入收金额!' }
]
}
},
@@ -168,12 +178,14 @@
editAfter() {
if (this.action === 'add') {
this.addInit("SR")
this.fileList = []
} else {
this.model.billTime = this.model.billTimeStr
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark',
'accountId','changeAmount'))
});
this.fileList = this.model.fileName
// 加载子表数据
let params = {
headerId: this.model.id
@@ -192,6 +204,9 @@
totalPrice += item.eachAmount-0
}
billMain.totalPrice = totalPrice
if(this.fileList && this.fileList.length > 0) {
billMain.fileName = this.fileList
}
if(this.model.id){
billMain.id = this.model.id
}

View File

@@ -81,6 +81,13 @@
<a-col :lg="6" :md="12" :sm="24">
</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="附件">
<j-upload v-model="fileList" bizPath="financial"></j-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal>
@@ -90,11 +97,13 @@
import { FormTypes } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { FinancialModalMixin } from '../mixins/FinancialModalMixin'
import JUpload from '@/components/jeecg/JUpload'
import JDate from '@/components/jeecg/JDate'
export default {
name: "ItemOutModal",
mixins: [JEditableTableMixin, FinancialModalMixin],
components: {
JUpload,
JDate
},
data () {
@@ -106,6 +115,7 @@
addDefaultRowNum: 1,
visible: false,
model: {},
fileList:[],
labelCol: {
xs: { span: 24 },
sm: { span: 8 },
@@ -168,12 +178,14 @@
editAfter() {
if (this.action === 'add') {
this.addInit("ZC")
this.fileList = []
} else {
this.model.billTime = this.model.billTimeStr
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark',
'accountId','changeAmount'))
});
this.fileList = this.model.fileName
// 加载子表数据
let params = {
headerId: this.model.id
@@ -193,6 +205,9 @@
}
billMain.totalPrice = 0-totalPrice
billMain.changeAmount = 0-billMain.changeAmount
if(this.fileList && this.fileList.length > 0) {
billMain.fileName = this.fileList
}
if(this.model.id){
billMain.id = this.model.id
}

View File

@@ -155,10 +155,10 @@
loading: false,
dataSource: [],
columns: [
{ title: '销售单据编号',key: 'billNumber',width: '20%', type: FormTypes.input, readonly: true },
{ title: '应欠款',key: 'needDebt', width: '10%', type: FormTypes.inputNumber, statistics: true, readonly: true },
{ title: '已欠款', key: 'finishDebt', width: '10%', type: FormTypes.inputNumber, statistics: true, readonly: true },
{ title: '本次款',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请输入${title}',
{ title: '采购单据编号',key: 'billNumber',width: '20%', type: FormTypes.input, readonly: true },
{ title: '应欠款',key: 'needDebt', width: '10%', type: FormTypes.inputNumber, statistics: true, readonly: true },
{ title: '已欠款', key: 'finishDebt', width: '10%', type: FormTypes.inputNumber, statistics: true, readonly: true },
{ title: '本次款',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请输入${title}',
validateRules: [{ required: true, message: '${title}不能为空' }]
},
{ title: '备注',key: 'remark', width: '20%', type: FormTypes.input, placeholder: '请输入${title}'}