From 33edd279f345815a239024d398d556145543b403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Mon, 12 Apr 2021 00:34:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=80=E5=94=AE=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jshERP-web/src/api/api.js | 2 ++ .../src/views/bill/mixins/BillModalMixin.js | 15 ++++++++++++++- .../src/views/bill/modules/SaleOutModal.vue | 12 ++++++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/jshERP-web/src/api/api.js b/jshERP-web/src/api/api.js index 5f0f0e0e..db65799e 100644 --- a/jshERP-web/src/api/api.js +++ b/jshERP-web/src/api/api.js @@ -99,6 +99,7 @@ const addPerson = (params)=>postAction("/person/add",params); const editPerson = (params)=>putAction("/person/update",params); const checkPerson = (params)=>getAction("/person/checkIsNameExist",params); const getPersonByType = (params)=>getAction("/person/getPersonByType",params); +const getPersonByNumType = (params)=>getAction("/person/getPersonByNumType",params); //账户管理 const addAccount = (params)=>postAction("/account/add",params); const editAccount = (params)=>putAction("/account/update",params); @@ -219,6 +220,7 @@ export { editPerson, checkPerson, getPersonByType, + getPersonByNumType, addAccount, editAccount, checkAccount, diff --git a/jshERP-web/src/views/bill/mixins/BillModalMixin.js b/jshERP-web/src/views/bill/mixins/BillModalMixin.js index c643b3d4..9b8dfd40 100644 --- a/jshERP-web/src/views/bill/mixins/BillModalMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillModalMixin.js @@ -1,5 +1,5 @@ import { VALIDATE_NO_PASSED, validateFormAndTables } from '@/utils/JEditableTableUtil' -import {findBySelectSup,findBySelectCus,findBySelectRetail,getMaterialByBarCode,findStockByDepotAndBarCode,getAccount} from '@/api/api' +import {findBySelectSup,findBySelectCus,findBySelectRetail,getMaterialByBarCode,findStockByDepotAndBarCode,getAccount,getPersonByNumType} from '@/api/api' import { getAction,putAction } from '@/api/manage' import { getMpListShort, getNowFormatDateTime } from "@/utils/util" import Vue from 'vue' @@ -12,6 +12,10 @@ export const BillModalMixin = { supList: [], cusList: [], retailList: [], + personList: { + options: [], + value: '' + }, depotList: [], accountList: [], accountIdList: [], @@ -35,6 +39,7 @@ export const BillModalMixin = { this.initSupplier() this.initCustomer() this.initRetail() + this.initSalesman() this.initDepot() this.initAccount() }, @@ -96,6 +101,14 @@ export const BillModalMixin = { } }); }, + initSalesman() { + let that = this; + getPersonByNumType({type:1}).then((res)=>{ + if(res) { + that.personList.options = res; + } + }); + }, initDepot() { let that = this; getAction('/depot/findDepotByUserId?UBType=UserDepot&UBKeyId=').then((res) => { diff --git a/jshERP-web/src/views/bill/modules/SaleOutModal.vue b/jshERP-web/src/views/bill/modules/SaleOutModal.vue index 8f5d617c..19ac0c7c 100644 --- a/jshERP-web/src/views/bill/modules/SaleOutModal.vue +++ b/jshERP-web/src/views/bill/modules/SaleOutModal.vue @@ -97,6 +97,9 @@ + + + @@ -109,13 +112,15 @@ import { JEditableTableMixin } from '@/mixins/JEditableTableMixin' import { BillModalMixin } from '../mixins/BillModalMixin' import { getMpListShort } from "@/utils/util" + import JSelectMultiple from '@/components/jeecg/JSelectMultiple' import JDate from '@/components/jeecg/JDate' import Vue from 'vue' export default { name: "SaleOutModal", mixins: [JEditableTableMixin, BillModalMixin], components: { - JDate + JDate, + JSelectMultiple }, data () { return { @@ -186,6 +191,7 @@ editAfter() { if (this.action === 'add') { this.addInit("XSCK") + this.personList.value = '' } else { this.model.operTime = this.model.operTimeStr this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2) @@ -197,9 +203,10 @@ } else { this.manyAccountBtnStatus = false } + this.personList.value = this.model.salesMan this.$nextTick(() => { this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'remark', - 'discount','discountMoney','discountLastMoney','otherMoney','accountId','changeAmount','debt')) + 'discount','discountMoney','discountLastMoney','otherMoney','accountId','changeAmount','debt','salesMan')) }); // 加载子表数据 let params = { @@ -225,6 +232,7 @@ if(this.model.id){ billMain.id = this.model.id } + billMain.salesMan = this.personList.value return { info: JSON.stringify(billMain), rows: JSON.stringify(detailArr),