|
|
@@ -257,6 +257,30 @@
|
|
|
</div>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
+ <el-form-item label="业务来源" prop="srcType"
|
|
|
+ :rules="[{ required: true, message: '', trigger: 'blur' }]">
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="10">
|
|
|
+ <search-query :datalist="sourceTypeData" :selectValue="assemblyForm.srcType"
|
|
|
+ :disabled="detailData.seeDisabled || assemblyForm.feeCenterListD.filter(item => item.auditStatus > 0).length || assemblyForm.feeCenterListC.filter(item => item.auditStatus > 0).length"
|
|
|
+ :filterable="true" :clearable="true" :remote="true" :buttonIf="false"
|
|
|
+ placeholder="请选择业务来源" @corpChange="sourceCorp($event, 'srcType')">
|
|
|
+ </search-query>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="13">
|
|
|
+ <search-query :datalist="srcData" :selectValue="assemblyForm.srcCnName"
|
|
|
+ :filterable="true" :clearable="true" :remote="true"
|
|
|
+ :disabled="!assemblyForm.srcType || detailData.seeDisabled || assemblyForm.feeCenterListD.filter(item => item.auditStatus > 0).length || assemblyForm.feeCenterListC.filter(item => item.auditStatus > 0).length"
|
|
|
+ :buttonIf="false" :forParameter="sourceforParameter" placeholder="请选择来源明细"
|
|
|
+ @remoteMethod="sourceRemote($event, 'srcCnName')"
|
|
|
+ @corpChange="sourceCorp($event, 'srcCnName')"
|
|
|
+ @corpFocus="sourceRemote($event, 'srcCnName')">
|
|
|
+ </search-query>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
<!-- <el-form-item label="收货地" prop="placeReceiptName">
|
|
|
<span slot="label">
|
|
|
<el-popover placement="right" width="400" trigger="hover"
|
|
|
@@ -427,6 +451,18 @@
|
|
|
placeholder="请输入场站备注" @change="textareaBlur('cyRemarks')"></el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
+ <div style="margin-top: 4px">
|
|
|
+ <el-form-item label="箱属" prop="boxBelongsTo" label-width="60px">
|
|
|
+ <span slot="label">
|
|
|
+ <span style="color: #1e9fff">箱属</span>
|
|
|
+ </span>
|
|
|
+ <div>
|
|
|
+ <dic-select v-model="assemblyForm.boxBelongsTo" placeholder="箱属" key="dictKey"
|
|
|
+ label="dictValue" url="/blade-system/dict-biz/dictionary?code=boxBelongsTo"
|
|
|
+ :filterable="true" :disabled="detailData.seeDisabled"></dic-select>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
@@ -648,8 +684,7 @@
|
|
|
<span style="color: #1e9fff">件数</span>
|
|
|
</span>
|
|
|
<el-input ref="quantityRef" style="width: 100%;" v-model="assemblyForm.quantity"
|
|
|
- size="small" autocomplete="off" min="1"
|
|
|
- :disabled="detailData.seeDisabled"
|
|
|
+ size="small" autocomplete="off" min="1" :disabled="detailData.seeDisabled"
|
|
|
@input="quantityInput" @focus="quantityFocus" clearable
|
|
|
placeholder="请输入件数"></el-input>
|
|
|
</el-form-item>
|
|
|
@@ -670,8 +705,8 @@
|
|
|
</span>
|
|
|
<search-query :datalist="packingUnitData" style="margin-right: -10px;"
|
|
|
:selectValue="assemblyForm.packingUnit" :filterable="true" :clearable="true"
|
|
|
- :remote="true" :disabled="detailData.seeDisabled"
|
|
|
- :buttonIf="false" placeholder="请选择包装"
|
|
|
+ :remote="true" :disabled="detailData.seeDisabled" :buttonIf="false"
|
|
|
+ placeholder="请选择包装"
|
|
|
:forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
|
|
|
@remoteMethod="remoteMethod($event, 'packingUnit')"
|
|
|
@corpChange="corpChange($event, 'packingUnit')"
|
|
|
@@ -689,9 +724,8 @@
|
|
|
</span>
|
|
|
<el-input ref="grossWeightRef" step="0.01" style="width: 100%;"
|
|
|
v-model="assemblyForm.grossWeight" size="small" autocomplete="off"
|
|
|
- :disabled="detailData.seeDisabled"
|
|
|
- @input="floatingInput($event, 'grossWeight')" @focus="quantityFocus" clearable
|
|
|
- placeholder="请输入毛重"></el-input>
|
|
|
+ :disabled="detailData.seeDisabled" @input="floatingInput($event, 'grossWeight')"
|
|
|
+ @focus="quantityFocus" clearable placeholder="请输入毛重"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
@@ -702,9 +736,8 @@
|
|
|
</span>
|
|
|
<el-input ref="measurementRef" step="0.01" style="width: 106%;"
|
|
|
v-model="assemblyForm.measurement" size="small" autocomplete="off"
|
|
|
- :disabled="detailData.seeDisabled"
|
|
|
- @input="floatingInput($event, 'measurement')" @focus="quantityFocus" clearable
|
|
|
- placeholder="请输入尺码/体积"></el-input>
|
|
|
+ :disabled="detailData.seeDisabled" @input="floatingInput($event, 'measurement')"
|
|
|
+ @focus="quantityFocus" clearable placeholder="请输入尺码/体积"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</div>
|
|
|
@@ -922,7 +955,6 @@
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
-
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
@@ -1112,6 +1144,7 @@ import {
|
|
|
getDeptTree,
|
|
|
getLazyList
|
|
|
} from "@/api/system/dept";
|
|
|
+import { selectListLos } from "@/api/approval/processConfig";
|
|
|
export default {
|
|
|
props: {
|
|
|
detailData: {
|
|
|
@@ -1145,6 +1178,21 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ sourceTypeData: [
|
|
|
+ {
|
|
|
+ label: '公司',
|
|
|
+ value: 'OWN'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '代理',
|
|
|
+ value: 'AGENT'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '业务员',
|
|
|
+ value: 'SALES'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ srcData: [],
|
|
|
roleName: localStorage.getItem("roleName"),
|
|
|
dicTree: [],
|
|
|
textareaNumber: 5,
|
|
|
@@ -1286,6 +1334,93 @@ export default {
|
|
|
this.dicTree = res.data.data
|
|
|
})
|
|
|
},
|
|
|
+ // 业务来源下拉
|
|
|
+ sourceCorp(value, name) {
|
|
|
+ if (name == 'srcCnName') {
|
|
|
+ if (!value) {
|
|
|
+ this.$set(this.assemblyForm, 'srcId', '')
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', '')
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', '')
|
|
|
+ }
|
|
|
+ for (let item of this.srcData) {
|
|
|
+ if (item[this.sourceforParameter.value] == value) {
|
|
|
+ if (this.assemblyForm.srcType == 'OWN') {
|
|
|
+ // 国家
|
|
|
+ this.$set(this.assemblyForm, 'srcId', item.id)
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', item.title)
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', item.title)
|
|
|
+ } else if (this.assemblyForm.srcType == 'AGENT') {
|
|
|
+ // 代理
|
|
|
+ this.$set(this.assemblyForm, 'srcId', item.id)
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', item.cnName)
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', item.cnName)
|
|
|
+ } else if (this.assemblyForm.srcType == 'SALES') {
|
|
|
+ // 业务员
|
|
|
+ this.$set(this.assemblyForm, 'srcId', item.id)
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', item.name)
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', item.name)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (name == 'srcType') {
|
|
|
+ this.$set(this.assemblyForm, 'srcType', value)
|
|
|
+ this.$set(this.assemblyForm, 'srcId', '')
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', '')
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', '')
|
|
|
+ if (this.assemblyForm.srcType == 'OWN') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'title', value: 'title' }
|
|
|
+ this.ownDeptLazyTreefun()
|
|
|
+ } else if (this.assemblyForm.srcType == 'AGENT') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'cnName', value: 'cnName' }
|
|
|
+ this.agentBcorpsListfun()
|
|
|
+ } else if (this.assemblyForm.srcType == 'SALES') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'name', value: 'name' }
|
|
|
+ this.salesUserGetListfun()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 业务来源接口
|
|
|
+ sourceRemote(value, name) {
|
|
|
+ if (name == 'srcCnName') {
|
|
|
+ if (this.assemblyForm.srcType == 'OWN') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'title', value: 'title' }
|
|
|
+ this.ownDeptLazyTreefun()
|
|
|
+ } else if (this.assemblyForm.srcType == 'AGENT') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'cnName', value: 'cnName' }
|
|
|
+ this.agentBcorpsListfun(value)
|
|
|
+ } else if (this.assemblyForm.srcType == 'SALES') {
|
|
|
+ this.sourceforParameter = { key: 'id', label: 'name', value: 'name' }
|
|
|
+ this.salesUserGetListfun(value)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ agentBcorpsListfun(cnName) {
|
|
|
+ let corpTypeName = '国内直接客户,国内同行及代理,国外直接客户,国外同行及代理,代理客户'
|
|
|
+ getBcorpslistByType(1, 10, { cnName, corpTypeName }).then(res => {
|
|
|
+ this.srcData = res.data.data.records
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取业务来源业务员数据
|
|
|
+ salesUserGetListfun(account) {
|
|
|
+ selectListLos('业务员').then(res => {
|
|
|
+ this.srcData = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取公司名称 用户管理左侧
|
|
|
+ ownDeptLazyTreefun() {
|
|
|
+ getDeptLazyTree(0).then(res => {
|
|
|
+ this.srcData = res.data.data
|
|
|
+ // 来源 内容 默认登录人所属公司
|
|
|
+ for (let item of this.srcData) {
|
|
|
+ if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_id) {
|
|
|
+ this.$set(this.assemblyForm, 'srcId', item.id)
|
|
|
+ this.$set(this.assemblyForm, 'srcCnName', item.title)
|
|
|
+ this.$set(this.assemblyForm, 'srcEnName', item.title)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
treeChange(val) {
|
|
|
for (let item of this.dicTree) {
|
|
|
if (item.title == val) {
|
|
|
@@ -1368,10 +1503,10 @@ export default {
|
|
|
},
|
|
|
// 件数聚焦
|
|
|
quantityFocus() {
|
|
|
- if (this.assemblyForm.containersList&&this.assemblyForm.containersList.length) {
|
|
|
- let num=0
|
|
|
- for(let item of this.assemblyForm.containersList){
|
|
|
- num+=Number(item.quantity)
|
|
|
+ if (this.assemblyForm.containersList && this.assemblyForm.containersList.length) {
|
|
|
+ let num = 0
|
|
|
+ for (let item of this.assemblyForm.containersList) {
|
|
|
+ num += Number(item.quantity)
|
|
|
}
|
|
|
if (Number(num) == 0) {
|
|
|
this.$alert('当前数据已经均分箱量,请撤销之后再修改', '提示', {
|