给销售出库增加销售人员

This commit is contained in:
季圣华
2021-04-12 00:34:46 +08:00
parent fd3388de89
commit 33edd279f3
3 changed files with 26 additions and 3 deletions

View File

@@ -99,6 +99,7 @@ const addPerson = (params)=>postAction("/person/add",params);
const editPerson = (params)=>putAction("/person/update",params); const editPerson = (params)=>putAction("/person/update",params);
const checkPerson = (params)=>getAction("/person/checkIsNameExist",params); const checkPerson = (params)=>getAction("/person/checkIsNameExist",params);
const getPersonByType = (params)=>getAction("/person/getPersonByType",params); const getPersonByType = (params)=>getAction("/person/getPersonByType",params);
const getPersonByNumType = (params)=>getAction("/person/getPersonByNumType",params);
//账户管理 //账户管理
const addAccount = (params)=>postAction("/account/add",params); const addAccount = (params)=>postAction("/account/add",params);
const editAccount = (params)=>putAction("/account/update",params); const editAccount = (params)=>putAction("/account/update",params);
@@ -219,6 +220,7 @@ export {
editPerson, editPerson,
checkPerson, checkPerson,
getPersonByType, getPersonByType,
getPersonByNumType,
addAccount, addAccount,
editAccount, editAccount,
checkAccount, checkAccount,

View File

@@ -1,5 +1,5 @@
import { VALIDATE_NO_PASSED, validateFormAndTables } from '@/utils/JEditableTableUtil' 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 { getAction,putAction } from '@/api/manage'
import { getMpListShort, getNowFormatDateTime } from "@/utils/util" import { getMpListShort, getNowFormatDateTime } from "@/utils/util"
import Vue from 'vue' import Vue from 'vue'
@@ -12,6 +12,10 @@ export const BillModalMixin = {
supList: [], supList: [],
cusList: [], cusList: [],
retailList: [], retailList: [],
personList: {
options: [],
value: ''
},
depotList: [], depotList: [],
accountList: [], accountList: [],
accountIdList: [], accountIdList: [],
@@ -35,6 +39,7 @@ export const BillModalMixin = {
this.initSupplier() this.initSupplier()
this.initCustomer() this.initCustomer()
this.initRetail() this.initRetail()
this.initSalesman()
this.initDepot() this.initDepot()
this.initAccount() 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() { initDepot() {
let that = this; let that = this;
getAction('/depot/findDepotByUserId?UBType=UserDepot&UBKeyId=').then((res) => { getAction('/depot/findDepotByUserId?UBType=UserDepot&UBKeyId=').then((res) => {

View File

@@ -97,6 +97,9 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6" :md="12" :sm="24"> <a-col :lg="6" :md="12" :sm="24">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员">
<j-select-multiple placeholder="请选择销售人员" v-model="personList.value" :options="personList.options"/>
</a-form-item>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
@@ -109,13 +112,15 @@
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin' import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { BillModalMixin } from '../mixins/BillModalMixin' import { BillModalMixin } from '../mixins/BillModalMixin'
import { getMpListShort } from "@/utils/util" import { getMpListShort } from "@/utils/util"
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
import JDate from '@/components/jeecg/JDate' import JDate from '@/components/jeecg/JDate'
import Vue from 'vue' import Vue from 'vue'
export default { export default {
name: "SaleOutModal", name: "SaleOutModal",
mixins: [JEditableTableMixin, BillModalMixin], mixins: [JEditableTableMixin, BillModalMixin],
components: { components: {
JDate JDate,
JSelectMultiple
}, },
data () { data () {
return { return {
@@ -186,6 +191,7 @@
editAfter() { editAfter() {
if (this.action === 'add') { if (this.action === 'add') {
this.addInit("XSCK") this.addInit("XSCK")
this.personList.value = ''
} else { } else {
this.model.operTime = this.model.operTimeStr this.model.operTime = this.model.operTimeStr
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2) this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2)
@@ -197,9 +203,10 @@
} else { } else {
this.manyAccountBtnStatus = false this.manyAccountBtnStatus = false
} }
this.personList.value = this.model.salesMan
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'remark', 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 = { let params = {
@@ -225,6 +232,7 @@
if(this.model.id){ if(this.model.id){
billMain.id = this.model.id billMain.id = this.model.id
} }
billMain.salesMan = this.personList.value
return { return {
info: JSON.stringify(billMain), info: JSON.stringify(billMain),
rows: JSON.stringify(detailArr), rows: JSON.stringify(detailArr),