|
|
@@ -8,8 +8,8 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
- <el-button v-if="detailData.seeDisabled" size="small" @click="editHandle" type="primary" style="margin-right: 8px"
|
|
|
- :loading="saveLoading">编 辑
|
|
|
+ <el-button v-if="detailData.seeDisabled" size="small" @click="editHandle" type="primary"
|
|
|
+ style="margin-right: 8px" :loading="saveLoading">编 辑
|
|
|
</el-button>
|
|
|
<el-dropdown style="margin-right: 8px;">
|
|
|
<el-button type="primary" size="small" :loading="saveLoading">
|
|
|
@@ -127,8 +127,8 @@
|
|
|
:value="item.accountNo"></el-option>
|
|
|
</el-select>
|
|
|
<el-select v-else-if="item.prop === 'corpAttn'" v-model="form[item.prop]" placeholder="请选择" clearable
|
|
|
- filterable allow-create default-first-option size="small" style="width: 100%;" @change="corpAttnChange"
|
|
|
- :disabled="detailData.seeDisabled || browse">
|
|
|
+ filterable allow-create default-first-option size="small" style="width: 100%;"
|
|
|
+ @change="corpAttnChange" :disabled="detailData.seeDisabled || browse">
|
|
|
<el-option v-for="(item, index) in khInfoList" :key="index" :label="item.cname"
|
|
|
:value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
@@ -140,13 +140,14 @@
|
|
|
<el-radio size="small" :disabled="item.disabled || detailData.seeDisabled || browse"
|
|
|
v-model.trim="form[item.prop]" :label="0">否</el-radio>
|
|
|
</span>
|
|
|
- <el-select v-else-if="item.prop === 'chargeMember'" v-model="form[item.prop]" placeholder="请选择" filterable
|
|
|
- size="small" style="width: 100%;" :disabled="detailData.seeDisabled || browse">
|
|
|
+ <el-select v-else-if="item.prop === 'chargeMember'" v-model="form[item.prop]" placeholder="请选择"
|
|
|
+ filterable size="small" style="width: 100%;" :disabled="detailData.seeDisabled || browse">
|
|
|
<el-option v-for="(item, index) in userList" :key="index" :label="item.cname"
|
|
|
:value="item.cname"></el-option>
|
|
|
</el-select>
|
|
|
- <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small"
|
|
|
- autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
|
|
|
+ <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]"
|
|
|
+ size="small" autocomplete="off"
|
|
|
+ :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
|
|
|
<el-input type="age" v-else v-model.trim="form[item.prop]" size="small" autocomplete="off"
|
|
|
:disabled="item.disabled || detailData.seeDisabled || browse" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
@@ -192,8 +193,9 @@
|
|
|
</el-input>
|
|
|
<el-input v-else-if="item.type == 'number'" placeholder="请输入" v-input-limit="2" size="small"
|
|
|
:disabled="item.disabled || detailData.seeDisabled || browse" v-model.trim="form[item.prop]" />
|
|
|
- <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small"
|
|
|
- autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
|
|
|
+ <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]"
|
|
|
+ size="small" autocomplete="off"
|
|
|
+ :disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
|
|
|
<el-input v-else type="age" v-model.trim="form[item.prop]" size="small" autocomplete="off"
|
|
|
:disabled="item.disabled || detailData.seeDisabled || browse"></el-input>
|
|
|
</el-form-item>
|
|
|
@@ -203,9 +205,9 @@
|
|
|
<containerTitle title="商品信息"></containerTitle>
|
|
|
<basic-container style="margin-bottom: 10px">
|
|
|
<avue-crud :option="customerContact" v-model="contactsForm" :data="goodsShowData" ref="crudContact"
|
|
|
- @row-save="rowSave" @row-click="handleRowClick" @row-update="rowUpdate" @selection-change="productSelection"
|
|
|
- @row-del="rowDel" @saveColumn="saveColumn('goods')" @resetColumn="resetColumn" :summary-method="summaryMethod"
|
|
|
- :cell-style="goodsRowClassName" :table-loading="goodsLoading" :key="index">
|
|
|
+ @row-save="rowSave" @row-update="rowUpdate" @selection-change="productSelection"
|
|
|
+ @row-del="rowDel" @saveColumn="saveColumn('goods')" @resetColumn="resetColumn"
|
|
|
+ :summary-method="summaryMethod" :cell-style="goodsRowClassName" :table-loading="goodsLoading" :key="index">
|
|
|
<template slot="headerSerial">
|
|
|
<span class="order_number">序号</span>
|
|
|
<el-button class="number_button" type="primary" icon="el-icon-circle-plus-outline" circle size="mini"
|
|
|
@@ -233,11 +235,11 @@
|
|
|
<span>{{ row.code }}</span>
|
|
|
</template>
|
|
|
<template slot="storageId" slot-scope="{ row }">
|
|
|
- <!--v-input-limit="2" 代表可以输入2位小数的数字 -->
|
|
|
- <el-select v-if="row.$cellEdit" v-model="row.storageId" allow-create filterable
|
|
|
- default-first-option @change="handleStorageNameChange(row)">
|
|
|
- <el-option v-for="(item, index) in row.storageQuantityList" :key="index" :label="item.storageName +'-'+ item.corpName"
|
|
|
- :value="item.storageId"></el-option>
|
|
|
+ <!--v-input-limit="2" 代表可以输入2位小数的数字 -->
|
|
|
+ <el-select v-if="row.$cellEdit" v-model="row.storageId" allow-create filterable default-first-option
|
|
|
+ @change="handleStorageNameChange(row)">
|
|
|
+ <el-option v-for="(item, index) in row.storageQuantityList" :key="index"
|
|
|
+ :label="item.storageName + '-' + item.corpName" :value="item.storageId"></el-option>
|
|
|
</el-select>
|
|
|
<span v-else>{{ row.storageName }}</span>
|
|
|
</template>
|
|
|
@@ -317,6 +319,10 @@
|
|
|
:disabled="detailData.seeDisabled || !form.corpId || browse" v-show="goodsActives == 'goods'">
|
|
|
政策
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="small" @click="DLSelection"
|
|
|
+ :disabled="detailData.seeDisabled || !form.corpId || browse">
|
|
|
+ 代理订单
|
|
|
+ </el-button>
|
|
|
<!-- 禁用规则:未选择明细,未点击编辑按钮,未进行审批,已经生成过-->
|
|
|
<!-- <el-button type="warning" icon="el-icon-plus" size="small"
|
|
|
:disabled="selection.length !== goodsShowData.length || detailData.seeDisabled || !form.status || form.status < 3 || form.createFreight == 1 || goodsShowData.length == 0"
|
|
|
@@ -395,11 +401,55 @@
|
|
|
</el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false" :loading="saveLoading">取 消</el-button>
|
|
|
- <el-button type="primary" @click="importGoods" v-if="commodityData !== true" :loading="saveLoading">导入</el-button>
|
|
|
+ <el-button type="primary" @click="importGoods" v-if="commodityData !== true"
|
|
|
+ :loading="saveLoading">导入</el-button>
|
|
|
<el-button type="primary" @click="importChoice" v-if="commodityData === true" :loading="saveLoading"
|
|
|
:disabled="tableData.length !== 1">导入</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="代理订单" append-to-body class="el-dialogDeep" :visible.sync="dialogVisibleDL" width="80%"
|
|
|
+ :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeDL">
|
|
|
+ <el-row :style="{ height: rowHeight }">
|
|
|
+ <el-col :span="10" style="height: 100%;overflow-y: auto">
|
|
|
+ <div>
|
|
|
+ <avue-crud :data="dataDL" :option="optionDL" @row-click="handleRowClick"></avue-crud>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="14">
|
|
|
+ <basic-container>
|
|
|
+ <avue-crud :option="optionTwo" :table-loading="loading" :data="DLListShow" ref="crud"
|
|
|
+ @refresh-change="refreshChangeDL" @selection-change="selectionChangeDL" @search-change="DLSearch"
|
|
|
+ :page.sync="page">
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-tabs v-model="activeName" @tab-click="tabHandleDL">
|
|
|
+ <el-tab-pane label="查询结果" name="searchList" />
|
|
|
+ <el-tab-pane label="已选定数据" name="importStaging" />
|
|
|
+ </el-tabs>
|
|
|
+ </template>
|
|
|
+ <template slot="orderQuantity" slot-scope="{row}">
|
|
|
+ <el-input-number v-model="row.orderQuantity" size="small" :controls="false" :precision="0"
|
|
|
+ @input="amountChange(row)" style="width: 100%" />
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-button type="text" icon="el-icon-edit" size="small"
|
|
|
+ @click.stop="importStagList(scope.row, scope.index, 'DL')" v-if="activeName == 'searchList'"
|
|
|
+ :disabled="DLListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
|
|
|
+ </el-button>
|
|
|
+ <el-button type="text" icon="el-icon-delete" size="small"
|
|
|
+ @click.stop="removeStagList(scope.row, scope.index, 'DL')" v-else>移除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </basic-container>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false" :loading="saveLoading">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="importDL" v-if="commodityData !== true" :loading="saveLoading">导入</el-button>
|
|
|
+ <!-- <el-button type="primary" @click="importDL" v-if="commodityData === true" :loading="saveLoading"
|
|
|
+ :disabled="tableData.length !== 1">导入</el-button> -->
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<el-dialog title="导入政策" append-to-body class="el-dialogDeep" :visible.sync="policyDialog" width="80%"
|
|
|
:close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closePolicy">
|
|
|
<el-row :style="{ height: rowHeight }">
|
|
|
@@ -433,9 +483,9 @@
|
|
|
<template slot="menuLeft">
|
|
|
<el-button type="info" size="mini" icon="el-icon-download" @click="downLoadPolicy">下载模板</el-button>
|
|
|
<el-upload :action="policyUrl + '?policyName=' + uploadPolicy.policyName + '&salesType=1'"
|
|
|
- :headers="headers" :disabled="uploadPolicy.policyName === '' || loadingPolicy" :on-progress="uploading"
|
|
|
- :show-file-list=false accept=".xls,.xlsx" multiple :on-success="successPolicy" :on-error="uploadError"
|
|
|
- style="float: right">
|
|
|
+ :headers="headers" :disabled="uploadPolicy.policyName === '' || loadingPolicy"
|
|
|
+ :on-progress="uploading" :show-file-list=false accept=".xls,.xlsx" multiple
|
|
|
+ :on-success="successPolicy" :on-error="uploadError" style="float: right">
|
|
|
<el-button type="warning" size="mini" icon="el-icon-upload"
|
|
|
:disabled="uploadPolicy.policyName === '' || loadingPolicy" :loading="loadingPolicy">导 入
|
|
|
</el-button>
|
|
|
@@ -452,8 +502,8 @@
|
|
|
</basic-container>
|
|
|
<containerTitle title="买赠促销"></containerTitle>
|
|
|
<basic-container>
|
|
|
- <avue-crud :option="customerBuyFree" :data="contactsDataBuyFree" @selection-change="selectionChangePolicyTwo"
|
|
|
- :table-loading="loadingPolicy" ref="crudContactE">
|
|
|
+ <avue-crud :option="customerBuyFree" :data="contactsDataBuyFree"
|
|
|
+ @selection-change="selectionChangePolicyTwo" :table-loading="loadingPolicy" ref="crudContactE">
|
|
|
<template slot-scope="scope" slot="menu">
|
|
|
<el-button type="text" icon="el-icon-edit" size="mini" v-if="activeName == 'searchList'"
|
|
|
@click.stop="importStagList(scope.row, scope.index, 'policy_buyAndGive')"
|
|
|
@@ -553,7 +603,9 @@ import {
|
|
|
removeList,
|
|
|
repealCancel,
|
|
|
saveSell,
|
|
|
- typeSave
|
|
|
+ typeSave,
|
|
|
+ getAgencyOrder,
|
|
|
+ getAgencyOrderItem
|
|
|
} from "@/api/basicData/configuration"
|
|
|
import { getList } from "@/api/basicData/commodityType";
|
|
|
import { getCorpDetail } from "@/api/maintenance/overpayment"
|
|
|
@@ -613,10 +665,34 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ dataDL: [],
|
|
|
+ optionDL: {
|
|
|
+ header: false,
|
|
|
+ menu:false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '订单号',
|
|
|
+ prop: 'orgOrderNo',
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: '订单日期',
|
|
|
+ prop: 'businesDate',
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: '收货地址',
|
|
|
+ prop: 'arrivalAddress',
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: '品牌',
|
|
|
+ prop: 'brand',
|
|
|
+ overHidden: true
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
storageNameList: [],
|
|
|
surplusRouteQuantityOption: [],
|
|
|
saveLoading: false,
|
|
|
- userInfo:null,
|
|
|
+ userInfo: null,
|
|
|
disabled: false,
|
|
|
form: {
|
|
|
corpId: null,
|
|
|
@@ -662,6 +738,7 @@ export default {
|
|
|
choiceData: false,
|
|
|
commodityData: false,
|
|
|
dataCost: [],
|
|
|
+ treeDataDL: [],
|
|
|
treeDataPolicy: [],
|
|
|
treeDataGoods: [],
|
|
|
choiceIndex: '',
|
|
|
@@ -1367,6 +1444,7 @@ export default {
|
|
|
switchDialog: false,
|
|
|
// 商品信息表格loading
|
|
|
goodsLoading: false,
|
|
|
+ dialogVisibleDL: false,
|
|
|
// 上传时带的参数
|
|
|
uploadPolicy: {
|
|
|
policyName: '',
|
|
|
@@ -1378,10 +1456,12 @@ export default {
|
|
|
activeName: 'searchList',
|
|
|
// 商品列表数据合计
|
|
|
goodsListShow: [],
|
|
|
+ DLListShow: [],
|
|
|
dataTwo: [],
|
|
|
dataThree: [],
|
|
|
// 商品列表暂存
|
|
|
goodsListSave: [],
|
|
|
+ DLListSave: [],
|
|
|
goodsListPolicy: [],
|
|
|
buyAndGiveList: [],
|
|
|
goodsListTotal: 0,
|
|
|
@@ -1488,7 +1568,7 @@ export default {
|
|
|
}
|
|
|
this.getDefault()
|
|
|
if (this.detailData.id) {
|
|
|
- // 详情进入
|
|
|
+ // 详情进入
|
|
|
this.queryData(this.detailData.id)
|
|
|
}
|
|
|
if (this.detailData.check) {
|
|
|
@@ -1503,7 +1583,7 @@ export default {
|
|
|
|
|
|
}
|
|
|
if (this.detailData.copyId) {
|
|
|
- // 复制进入
|
|
|
+ // 复制进入
|
|
|
this.queryData(this.detailData.copyId, true)
|
|
|
}
|
|
|
this.oldForm = Object.assign({}, this.form);
|
|
|
@@ -1533,7 +1613,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleStorageNameChange(row) {
|
|
|
- console.log(row,1535)
|
|
|
+ console.log(row, 1535)
|
|
|
this.choiceIndexT = row.$index
|
|
|
let index = row.storageQuantityList.findIndex(function (item) {
|
|
|
return item.storageId === row.storageId;
|
|
|
@@ -1543,9 +1623,9 @@ export default {
|
|
|
this.goodsShowData[this.choiceIndexT].storageName = row.storageQuantityList[index].storageName;
|
|
|
this.goodsShowData[this.choiceIndexT].purchaseAmount = row.storageQuantityList[index].stockPrice;
|
|
|
|
|
|
- // 获取供应商名称
|
|
|
- this.goodsShowData[this.choiceIndexT].corpId = row.storageQuantityList[index].corpId;
|
|
|
- this.goodsShowData[this.choiceIndexT].corpName = row.storageQuantityList[index].corpName;
|
|
|
+ // 获取供应商名称
|
|
|
+ this.goodsShowData[this.choiceIndexT].corpId = row.storageQuantityList[index].corpId;
|
|
|
+ this.goodsShowData[this.choiceIndexT].corpName = row.storageQuantityList[index].corpName;
|
|
|
},
|
|
|
getGoodsRow(event, row) {
|
|
|
row.priceCategory = event.goodsTypeName
|
|
|
@@ -1567,9 +1647,9 @@ export default {
|
|
|
row.storageId = res.data.data[0].storageId
|
|
|
row.storageName = res.data.data[0].storageName
|
|
|
row.storageQuantity = res.data.data[0].surplusRouteQuantity
|
|
|
- // 获取供应商名称
|
|
|
- row.corpId = res.data.data[0].corpId;
|
|
|
- row.corpName = res.data.data[0].corpName;
|
|
|
+ // 获取供应商名称
|
|
|
+ row.corpId = res.data.data[0].corpId;
|
|
|
+ row.corpName = res.data.data[0].corpName;
|
|
|
if (res.data.data[0].tenantId !== "681169") {
|
|
|
row.purchaseAmount = res.data.data[0].stockPrice
|
|
|
}
|
|
|
@@ -1580,7 +1660,7 @@ export default {
|
|
|
this.quantityChange(row)
|
|
|
},
|
|
|
queryData(id, isCopy = false, other) {
|
|
|
- console.log(id,isCopy,other,'1573')
|
|
|
+ console.log(id, isCopy, other, '1573')
|
|
|
this.pageLoading = true
|
|
|
this.saveLoading = true
|
|
|
detail(id).then(async res => {
|
|
|
@@ -1593,18 +1673,18 @@ export default {
|
|
|
})
|
|
|
|
|
|
this.contactsData = this.form.orderItemsList.filter(item => {
|
|
|
- return item.goodType == 0
|
|
|
+ return item.goodType == 0
|
|
|
})
|
|
|
- for(let item of this.contactsData) {
|
|
|
- item.storageId = item.storageId + '-' + item.corpId
|
|
|
- }
|
|
|
- console.log(this.contactsData,1598)
|
|
|
+ for (let item of this.contactsData) {
|
|
|
+ item.storageId = item.storageId + '-' + item.corpId
|
|
|
+ }
|
|
|
+ console.log(this.contactsData, 1598)
|
|
|
this.giftData = this.form.orderItemsList.filter(item => {
|
|
|
return item.goodType == 1
|
|
|
})
|
|
|
- for(let item of this.giftData) {
|
|
|
- item.storageId = item.storageId + '-' + item.corpId
|
|
|
- }
|
|
|
+ for (let item of this.giftData) {
|
|
|
+ item.storageId = item.storageId + '-' + item.corpId
|
|
|
+ }
|
|
|
this.goodsShowData = this.giftData;
|
|
|
this.goodsActives = 'goods';
|
|
|
this.handleClick({ name: this.goodsActives })
|
|
|
@@ -1685,19 +1765,19 @@ export default {
|
|
|
this.oldFeesList = this.deepClone(this.advantageProjectData)
|
|
|
this.oldUploadList = this.deepClone(this.bankOfDepositData)
|
|
|
if (isCopy) {
|
|
|
- // 复制的处理数据
|
|
|
+ // 复制的处理数据
|
|
|
this.$set(this.form, 'orderStatus', '录入')
|
|
|
this.form.status = 0
|
|
|
this.browse = false
|
|
|
|
|
|
- // 复制的数据要清除 生产时间
|
|
|
- this.form.actualDeliveryDate = null
|
|
|
- // 已收款复制零
|
|
|
- this.form.settlmentAmount = 0
|
|
|
- this.form.thisUsedProfit = 0
|
|
|
- this.form.purchaseStatus = null
|
|
|
- this.form.receivingStatus = null
|
|
|
- this.form.specialCheckStatus = 0
|
|
|
+ // 复制的数据要清除 生产时间
|
|
|
+ this.form.actualDeliveryDate = null
|
|
|
+ // 已收款复制零
|
|
|
+ this.form.settlmentAmount = 0
|
|
|
+ this.form.thisUsedProfit = 0
|
|
|
+ this.form.purchaseStatus = null
|
|
|
+ this.form.receivingStatus = null
|
|
|
+ this.form.specialCheckStatus = 0
|
|
|
|
|
|
delete this.form.id
|
|
|
delete this.form.orgOrderNo
|
|
|
@@ -1834,6 +1914,7 @@ export default {
|
|
|
},
|
|
|
//点击行可编辑
|
|
|
handleRowClick(row, event, column) {
|
|
|
+ this.onLoadDL(row)
|
|
|
},
|
|
|
//商品编辑
|
|
|
rowCell(row, index) {
|
|
|
@@ -1851,20 +1932,20 @@ export default {
|
|
|
warehouseId: selectedValue
|
|
|
}).then(res => {
|
|
|
if (res.data.data.length > 0) {
|
|
|
- var datas = res.data.data;
|
|
|
+ var datas = res.data.data;
|
|
|
|
|
|
- var arr = datas.map(item=>{
|
|
|
- item.storageId = item.storageId + '-' + item.corpId
|
|
|
- return item
|
|
|
- })
|
|
|
+ var arr = datas.map(item => {
|
|
|
+ item.storageId = item.storageId + '-' + item.corpId
|
|
|
+ return item
|
|
|
+ })
|
|
|
this.$set(this.goodsShowData[row.$index], 'storageQuantityList', arr)
|
|
|
// this.goodsShowData[row.$index].storageQuantityList = res.data.data;
|
|
|
this.goodsShowData[row.$index].storageId = res.data.data[0].storageId;
|
|
|
this.goodsShowData[row.$index].storageName = res.data.data[0].storageName;
|
|
|
this.goodsShowData[row.$index].storageQuantity = res.data.data[0].surplusRouteQuantity;
|
|
|
// 获取供应商名称
|
|
|
- this.goodsShowData[row.$index].corpId = res.data.data[0].corpId;
|
|
|
- this.goodsShowData[row.$index].corpName = res.data.data[0].corpName;
|
|
|
+ this.goodsShowData[row.$index].corpId = res.data.data[0].corpId;
|
|
|
+ this.goodsShowData[row.$index].corpName = res.data.data[0].corpName;
|
|
|
if (res.data.data[0].tenantId !== "681169") {
|
|
|
this.goodsShowData[row.$index].purchaseAmount = res.data.data[0].stockPrice
|
|
|
}
|
|
|
@@ -1894,6 +1975,18 @@ export default {
|
|
|
this.commodityData = false
|
|
|
this.goodsListSave = [];
|
|
|
},
|
|
|
+ DLSelection() {
|
|
|
+ if (this.form.storageId == '') {
|
|
|
+ return this.$message.error('请选择仓库')
|
|
|
+ }
|
|
|
+ this.dialogVisibleDL = !this.dialogVisibleDL
|
|
|
+ this.tableData = []
|
|
|
+ this.commodityData = false
|
|
|
+ this.DLListSave = [];
|
|
|
+ getAgencyOrder().then(res => {
|
|
|
+ this.dataDL = res.data.data
|
|
|
+ })
|
|
|
+ },
|
|
|
//政策价格导入
|
|
|
policy() {
|
|
|
this.$set(this.customerBuyFree, 'menu', true)
|
|
|
@@ -1986,7 +2079,7 @@ export default {
|
|
|
this.$set(item, 'amount', '0')
|
|
|
this.$set(item, 'sort', this.maxFeeNum + 1)
|
|
|
|
|
|
- this.$set(item, 'storageId',item.storageId + '-' + item.corpId)
|
|
|
+ this.$set(item, 'storageId', item.storageId + '-' + item.corpId)
|
|
|
|
|
|
this.maxFeeNum++
|
|
|
let a = {
|
|
|
@@ -2314,9 +2407,9 @@ export default {
|
|
|
row.storageId = res.data.data[0].storageId
|
|
|
row.storageName = res.data.data[0].storageName
|
|
|
row.storageQuantity = res.data.data[0].surplusRouteQuantity
|
|
|
- // 获取供应商名称
|
|
|
- row.corpId = res.data.data[0].corpId
|
|
|
- row.corpName = res.data.data[0].corpName
|
|
|
+ // 获取供应商名称
|
|
|
+ row.corpId = res.data.data[0].corpId
|
|
|
+ row.corpName = res.data.data[0].corpName
|
|
|
if (res.data.data[0].tenantId !== "681169") {
|
|
|
row.purchaseAmount = res.data.data[0].stockPrice
|
|
|
}
|
|
|
@@ -2356,9 +2449,9 @@ export default {
|
|
|
this.goodsShowData[this.choiceIndexT].storageId = res.data.data[0].storageId
|
|
|
this.goodsShowData[this.choiceIndexT].storageName = res.data.data[0].storageName
|
|
|
this.goodsShowData[this.choiceIndexT].storageQuantity = res.data.data[0].surplusRouteQuantity
|
|
|
- // 获取供应商名称
|
|
|
- this.goodsShowData[this.choiceIndexT].corpId = res.data.data[0].corpId
|
|
|
- this.goodsShowData[this.choiceIndexT].corpName = res.data.data[0].corpName
|
|
|
+ // 获取供应商名称
|
|
|
+ this.goodsShowData[this.choiceIndexT].corpId = res.data.data[0].corpId
|
|
|
+ this.goodsShowData[this.choiceIndexT].corpName = res.data.data[0].corpName
|
|
|
if (res.data.data[0].tenantId !== "681169") {
|
|
|
this.goodsShowData[this.choiceIndexT].purchaseAmount = res.data.data[0].stockPrice
|
|
|
}
|
|
|
@@ -2409,6 +2502,107 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ async importDL() {
|
|
|
+ this.surplusRouteQuantityOption.push({ storageQuantity: '0' });
|
|
|
+ if (this.DLListSave.length > 0) {
|
|
|
+ this.DLListSaveHandle()
|
|
|
+ } else {
|
|
|
+ if (this.tableData.length > 0) {
|
|
|
+ this.tableDataHandle()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ DLListSaveHandle() {
|
|
|
+ this.saveLoading = true;
|
|
|
+ for (let item in this.DLListSave) {
|
|
|
+ getMarketPrice({
|
|
|
+ code: this.DLListSave[item].code,
|
|
|
+ isFreight: this.form.isFreight,
|
|
|
+ isLabel: this.form.isLabel
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.data.length > 0) {
|
|
|
+ this.$set(this.DLListSave[item], 'price', res.data.data[0].salePrice)
|
|
|
+ } else {
|
|
|
+ this.$set(this.DLListSave[item], 'price', '0')
|
|
|
+ }
|
|
|
+ this.priceChange(this.DLListSave[item])
|
|
|
+ })
|
|
|
+ selectGoodsNum({
|
|
|
+ goodsId: this.DLListSave[item].id,
|
|
|
+ itemType: this.DLListSave[item].typeno,
|
|
|
+ tradeType: 'GN',
|
|
|
+ warehouseId: this.form.storageId
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.data.length > 0) {
|
|
|
+ res.data.data.forEach(e => {
|
|
|
+ e.storageId = e.storageId + '-' + e.corpId
|
|
|
+ })
|
|
|
+ this.$set(this.DLListSave[item], 'storageQuantityList', res.data.data)
|
|
|
+ this.$set(this.DLListSave[item], 'storageId', res.data.data[0].storageId)
|
|
|
+ this.$set(this.DLListSave[item], 'storageName', res.data.data[0].storageName)
|
|
|
+ this.$set(this.DLListSave[item], 'storageQuantity', res.data.data[0].surplusRouteQuantity)
|
|
|
+ // 获取供应商名称
|
|
|
+ this.$set(this.DLListSave[item], 'corpId', res.data.data[0].corpId)
|
|
|
+ this.$set(this.DLListSave[item], 'corpName', res.data.data[0].corpName)
|
|
|
+ if (res.data.data[0].tenantId !== "681169") {
|
|
|
+ this.$set(this.DLListSave[item], 'purchaseAmount', res.data.data[0].stockPrice)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // this.DLListSave[item].storageQuantity = res.data.data
|
|
|
+ this.$set(this.DLListSave[item], 'priceCategory', this.DLListSave[item].goodsTypeName)
|
|
|
+ // this.DLListSave[item].priceCategory = this.DLListSave[item].goodsTypeName
|
|
|
+ delete this.DLListSave[item].goodsTypeName
|
|
|
+ this.DLListSave[item].itemId = this.DLListSave[item].id
|
|
|
+ this.$set(this.DLListSave[item], 'corpName', this.DLListSave[item].corpName)
|
|
|
+ this.$set(this.DLListSave[item], 'itemType', this.DLListSave[item].typeno)
|
|
|
+ // this.$set(this.DLListSave[item], 'orderQuantity', 1)
|
|
|
+ this.$set(this.DLListSave[item], 'actualQuantity', 0)
|
|
|
+ this.$set(this.DLListSave[item], 'invoiceWeight', this.DLListSave[item].cartonWeight)
|
|
|
+ this.$set(this.DLListSave[item], 'shopQuality', 0)
|
|
|
+ this.$set(this.DLListSave[item], 'inputMold', 0) // 判断是商品还是政策 商品 0 特价 1 买赠2
|
|
|
+ // this.$set(this.DLListSave[item], 'priceType', this.DLListSave[item].policyName)
|
|
|
+ this.DLListSave[item].amount = 0
|
|
|
+ if (this.goodsActives == "goods") {
|
|
|
+ this.$set(this.DLListSave[item], 'goodType', 0)
|
|
|
+ } else {
|
|
|
+ this.$set(this.DLListSave[item], 'goodType', 1)
|
|
|
+ this.$set(this.DLListSave[item], 'integralMultiples', this.DLListSave[item].integral)
|
|
|
+ }
|
|
|
+ this.$set(this.DLListSave[item], 'integral', '0')
|
|
|
+ this.DLListSave[item].sort = this.maxGoodsNum + 1
|
|
|
+ if (this.form.packageRemarks) {
|
|
|
+ this.DLListSave[item].packageRemarks = this.form.packageRemarks
|
|
|
+ }
|
|
|
+ delete this.DLListSave[item].id
|
|
|
+ delete this.DLListSave[item].pid
|
|
|
+ delete this.DLListSave[item].isDeleted
|
|
|
+ delete this.DLListSave[item].status
|
|
|
+ delete this.DLListSave[item].tenantId
|
|
|
+ delete this.DLListSave[item].updateTime
|
|
|
+ delete this.DLListSave[item].updateUser
|
|
|
+ delete this.DLListSave[item].updateUserName
|
|
|
+ this.maxGoodsNum++
|
|
|
+
|
|
|
+ getPurchasePrice({ code: this.DLListSave[item].code }).then(res => {
|
|
|
+ if (res.data.data.length > 0) {
|
|
|
+ this.$set(this.DLListSave[item], 'purchaseAmount', res.data.data[0].purchasePrice)
|
|
|
+ this.$set(this.DLListSave[item], 'purchaseRebatePrice', res.data.data[0].purchaseRebatePrice)
|
|
|
+ } else {
|
|
|
+ this.$set(this.DLListSave[item], 'purchaseAmount', '0')
|
|
|
+ }
|
|
|
+ this.quantityChange(this.DLListSave[item])
|
|
|
+ this.$refs.crudContact.rowCellAdd(this.DLListSave[item]);
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.quantityChange(this.DLListSave[item])
|
|
|
+ })
|
|
|
+ })
|
|
|
+ // this.$refs.crudContact.rowCell(this.DLListSave[item], this.DLListSave.length - 1)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.saveLoading = false;
|
|
|
+ this.dialogVisibleDL = false
|
|
|
+ },
|
|
|
goodsListSaveHandle() {
|
|
|
this.saveLoading = true;
|
|
|
for (let item in this.goodsListSave) {
|
|
|
@@ -2431,16 +2625,16 @@ export default {
|
|
|
warehouseId: this.form.storageId
|
|
|
}).then(res => {
|
|
|
if (res.data.data.length > 0) {
|
|
|
- res.data.data.forEach(e=>{
|
|
|
- e.storageId = e.storageId + '-' + e.corpId
|
|
|
- })
|
|
|
+ res.data.data.forEach(e => {
|
|
|
+ e.storageId = e.storageId + '-' + e.corpId
|
|
|
+ })
|
|
|
this.$set(this.goodsListSave[item], 'storageQuantityList', res.data.data)
|
|
|
this.$set(this.goodsListSave[item], 'storageId', res.data.data[0].storageId)
|
|
|
this.$set(this.goodsListSave[item], 'storageName', res.data.data[0].storageName)
|
|
|
this.$set(this.goodsListSave[item], 'storageQuantity', res.data.data[0].surplusRouteQuantity)
|
|
|
- // 获取供应商名称
|
|
|
- this.$set(this.goodsListSave[item], 'corpId', res.data.data[0].corpId)
|
|
|
- this.$set(this.goodsListSave[item], 'corpName', res.data.data[0].corpName)
|
|
|
+ // 获取供应商名称
|
|
|
+ this.$set(this.goodsListSave[item], 'corpId', res.data.data[0].corpId)
|
|
|
+ this.$set(this.goodsListSave[item], 'corpName', res.data.data[0].corpName)
|
|
|
if (res.data.data[0].tenantId !== "681169") {
|
|
|
this.$set(this.goodsListSave[item], 'purchaseAmount', res.data.data[0].stockPrice)
|
|
|
}
|
|
|
@@ -2523,16 +2717,16 @@ export default {
|
|
|
warehouseId: selectedValue
|
|
|
}).then(res => {
|
|
|
if (res.data.data.length > 0) {
|
|
|
- res.data.data.forEach(e=>{
|
|
|
- e.storageId = e.storageId + '-' + e.corpId
|
|
|
- })
|
|
|
+ res.data.data.forEach(e => {
|
|
|
+ e.storageId = e.storageId + '-' + e.corpId
|
|
|
+ })
|
|
|
this.tableData[item].storageQuantityList = res.data.data;
|
|
|
this.tableData[item].storageId = res.data.data[0].storageId;
|
|
|
this.tableData[item].storageName = res.data.data[0].storageName;
|
|
|
this.tableData[item].storageQuantity = res.data.data[0].surplusRouteQuantity;
|
|
|
- // 获取供应商名称
|
|
|
- this.tableData[item].corpId = res.data.data[0].corpId;
|
|
|
- this.tableData[item].corpName = res.data.data[0].corpName;
|
|
|
+ // 获取供应商名称
|
|
|
+ this.tableData[item].corpId = res.data.data[0].corpId;
|
|
|
+ this.tableData[item].corpName = res.data.data[0].corpName;
|
|
|
if (res.data.data[0].tenantId !== "681169") {
|
|
|
this.tableData[item].purchaseAmount = res.data.data[0].stockPrice;
|
|
|
}
|
|
|
@@ -2594,6 +2788,11 @@ export default {
|
|
|
this.treeDeptId = "";
|
|
|
this.activeName = "searchList";
|
|
|
},
|
|
|
+ closeDL() {
|
|
|
+ this.treeDataDL = [];
|
|
|
+ this.treeDeptId = "";
|
|
|
+ this.activeName = "searchList";
|
|
|
+ },
|
|
|
closeFees() {
|
|
|
this.treeDeptIdCost = "";
|
|
|
this.treeData = [];
|
|
|
@@ -2610,6 +2809,10 @@ export default {
|
|
|
selectionChange(list) {
|
|
|
this.tableData = list
|
|
|
},
|
|
|
+ //选中触发
|
|
|
+ selectionChangeDl(list) {
|
|
|
+ this.tableData = list
|
|
|
+ },
|
|
|
//费用选中触发
|
|
|
selectionChangeCost(list) {
|
|
|
this.tableDataCost = list
|
|
|
@@ -2620,6 +2823,11 @@ export default {
|
|
|
this.page.currentPage = 1;
|
|
|
this.onLoad(this.page);
|
|
|
},
|
|
|
+ nodeClickDL(data) {
|
|
|
+ this.treeDeptId = data.id;
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoadDL(this.page);
|
|
|
+ },
|
|
|
//导入页销售政策查询
|
|
|
policyNodeClick(data) {
|
|
|
this.uploadPolicy.policyName = data.id;
|
|
|
@@ -2699,8 +2907,8 @@ export default {
|
|
|
if (this.policyDataTwo.length > 0 || this.goodsListPolicy.length > 0 || this.buyAndGiveList.length > 0) {
|
|
|
buyFree = this.deepClone((this.policyDataTwo.concat(this.goodsListPolicy)).concat(this.buyAndGiveList))
|
|
|
}
|
|
|
- console.log(this.policyData,'上面选择的数据')
|
|
|
- console.log(this.goodsListPolicy,'下面选择的数据')
|
|
|
+ console.log(this.policyData, '上面选择的数据')
|
|
|
+ console.log(this.goodsListPolicy, '下面选择的数据')
|
|
|
for (let item in list) {
|
|
|
if (this.policyData.length > 0 || this.buyAndGiveList > 0) {
|
|
|
if (!list[item].specialOffer) {
|
|
|
@@ -2744,9 +2952,9 @@ export default {
|
|
|
}
|
|
|
this.$set(list[item], 'inputMold', 2)
|
|
|
this.$set(buyFree[item], 'inputMold', 2)
|
|
|
- // 赠品价格是零
|
|
|
+ // 赠品价格是零
|
|
|
// this.$set(buyFree[item], 'price', list[item].salesPrice)
|
|
|
- this.$set(buyFree[item], 'price', 0)
|
|
|
+ this.$set(buyFree[item], 'price', 0)
|
|
|
this.$set(buyFree[item], 'orderQuantity', list[item].salesVolume)
|
|
|
this.$set(buyFree[item], 'itemType', list[item].typeno)
|
|
|
this.$set(list[item], 'goodType', 0)
|
|
|
@@ -2758,16 +2966,16 @@ export default {
|
|
|
warehouseId: this.form.storageId
|
|
|
}).then(res => {
|
|
|
if (res.data.data.length > 0) {
|
|
|
- res.data.data.forEach(e=>{
|
|
|
- e.storageId = e.storageId + '-' + e.corpId
|
|
|
- })
|
|
|
+ res.data.data.forEach(e => {
|
|
|
+ e.storageId = e.storageId + '-' + e.corpId
|
|
|
+ })
|
|
|
this.$set(list[item], 'storageQuantityList', res.data.data)
|
|
|
this.$set(list[item], 'storageId', res.data.data[0].storageId)
|
|
|
this.$set(list[item], 'storageName', res.data.data[0].storageName)
|
|
|
this.$set(list[item], 'storageQuantity', res.data.data[0].surplusRouteQuantity)
|
|
|
- // 获取供应商名称
|
|
|
- this.$set(list[item], 'corpId', res.data.data[0].corpId)
|
|
|
- this.$set(list[item], 'corpName', res.data.data[0].corpName)
|
|
|
+ // 获取供应商名称
|
|
|
+ this.$set(list[item], 'corpId', res.data.data[0].corpId)
|
|
|
+ this.$set(list[item], 'corpName', res.data.data[0].corpName)
|
|
|
if (res.data.data[0].tenantId !== "681169") {
|
|
|
this.$set(list[item], 'purchaseAmount', res.data.data[0].stockPrice)
|
|
|
}
|
|
|
@@ -2813,12 +3021,12 @@ export default {
|
|
|
this.$set(buyFree[item], 'shopQuality', 0)
|
|
|
this.$set(buyFree[item], 'goodType', 0)
|
|
|
|
|
|
- // 把采购价格赋值给返利价格
|
|
|
+ // 把采购价格赋值给返利价格
|
|
|
this.$set(buyFree[item], 'purchaseRebatePrice', buyFree[item].purchaseAmount)
|
|
|
- // 把买的库区赋值给赠的库区上
|
|
|
- this.$set(buyFree[item], 'storageId', list[item].storageId)
|
|
|
- // 把买的库存赋值给赠的库存上
|
|
|
- this.$set(buyFree[item], 'storageQuantity', list[item].storageQuantity)
|
|
|
+ // 把买的库区赋值给赠的库区上
|
|
|
+ this.$set(buyFree[item], 'storageId', list[item].storageId)
|
|
|
+ // 把买的库存赋值给赠的库存上
|
|
|
+ this.$set(buyFree[item], 'storageQuantity', list[item].storageQuantity)
|
|
|
|
|
|
this.maxGoodsNum++
|
|
|
delete buyFree[item].id
|
|
|
@@ -2851,35 +3059,35 @@ export default {
|
|
|
// for (let i = 0; i < this.$refs.crudContact.list.length; i++) {
|
|
|
// this.$refs.crudContact.list[i].purchaseRebatePrice = rest.data.data[0].purchaseRebatePrice;
|
|
|
// }
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.$refs.crudContact.rowCellAdd(list[item]);
|
|
|
- this.quantityChange(list[item])
|
|
|
- })
|
|
|
- if (listLength != 0) {
|
|
|
- this.$refs.crudContact.rowCellAdd(buyFree[item]);
|
|
|
- this.quantityChange(buyFree[item])
|
|
|
- }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.crudContact.rowCellAdd(list[item]);
|
|
|
+ this.quantityChange(list[item])
|
|
|
+ })
|
|
|
+ if (listLength != 0) {
|
|
|
+ this.$refs.crudContact.rowCellAdd(buyFree[item]);
|
|
|
+ this.quantityChange(buyFree[item])
|
|
|
+ }
|
|
|
} else {
|
|
|
console.log('rest>>>2', rest);
|
|
|
this.$set(this.$refs.crudContact.list[this.$refs.crudContact.list.length - 1], 'purchaseRebatePrice', 0)
|
|
|
// this.$refs.crudContact.list[item].purchaseRebatePrice = 0
|
|
|
this.$refs.crudContact.rowCellAdd(list[item]);
|
|
|
- if (listLength != 0) {
|
|
|
- this.$refs.crudContact.rowCellAdd(buyFree[item]);
|
|
|
- this.quantityChange(buyFree[item])
|
|
|
- }
|
|
|
- }
|
|
|
- }).catch(err=>{
|
|
|
- this.$refs.crudContact.rowCellAdd(list[item]);
|
|
|
if (listLength != 0) {
|
|
|
- this.$refs.crudContact.rowCellAdd(buyFree[item]);
|
|
|
- this.quantityChange(buyFree[item])
|
|
|
+ this.$refs.crudContact.rowCellAdd(buyFree[item]);
|
|
|
+ this.quantityChange(buyFree[item])
|
|
|
}
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ this.$refs.crudContact.rowCellAdd(list[item]);
|
|
|
+ if (listLength != 0) {
|
|
|
+ this.$refs.crudContact.rowCellAdd(buyFree[item]);
|
|
|
+ this.quantityChange(buyFree[item])
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
- // this.$refs.crudContact.rowCellAdd(list[item]);
|
|
|
- console.log('rest>>>', this.$refs.crudContact);
|
|
|
- console.log(this.$refs.crudContact,'this.$refs.crudContact')
|
|
|
+ // this.$refs.crudContact.rowCellAdd(list[item]);
|
|
|
+ console.log('rest>>>', this.$refs.crudContact);
|
|
|
+ console.log(this.$refs.crudContact, 'this.$refs.crudContact')
|
|
|
// this.$nextTick(() => {
|
|
|
// // 先让赠送的添加进去 延迟添加数据
|
|
|
// // this.$refs.crudContact.rowCellAdd(list[item]);
|
|
|
@@ -3035,6 +3243,15 @@ export default {
|
|
|
this.onLoad(this.page, params);
|
|
|
done()
|
|
|
},
|
|
|
+ DLSearch(params, done) {
|
|
|
+ this.treeDeptId = ''
|
|
|
+ params = {
|
|
|
+ ...params,
|
|
|
+ artsVision: this.form.belongToCorpId
|
|
|
+ }
|
|
|
+ this.onLoadDL(this.page, params);
|
|
|
+ done()
|
|
|
+ },
|
|
|
//商品列表查询
|
|
|
onLoad(page, params = { artsVision: this.form.belongToCorpId }) {
|
|
|
this.loading = true;
|
|
|
@@ -3047,6 +3264,14 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ //商品列表查询
|
|
|
+ onLoadDL(row) {
|
|
|
+ this.loading = true;
|
|
|
+ getAgencyOrderItem({id:row.id}).then(res => {
|
|
|
+ this.DLListShow = res.data.data;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 费用查询按钮
|
|
|
feesSearch(params, done) {
|
|
|
this.treeDeptIdCost = '';
|
|
|
@@ -3142,10 +3367,10 @@ export default {
|
|
|
let packFee;
|
|
|
if (this.form.packageRemarks && this.form.packageRemarks.indexOf('无包装') == -1) {
|
|
|
let arr = this.form.orderFeesList.filter(item => {
|
|
|
- return item.feesType == 1
|
|
|
+ return item.feesType == 1
|
|
|
})
|
|
|
packFee = arr.findIndex(item => {
|
|
|
- return item.feeName == '包装费'
|
|
|
+ return item.feeName == '包装费'
|
|
|
})
|
|
|
}
|
|
|
if (packFee == -1) {
|
|
|
@@ -3201,12 +3426,12 @@ export default {
|
|
|
});*/
|
|
|
await this.computedCost()
|
|
|
|
|
|
- // 把库区拼接的id拆开
|
|
|
- for(let item of this.form.orderItemsList) {
|
|
|
- console.log(item.storageId,item.storageId.indexOf('-'),3151)
|
|
|
- item.storageId = item.storageId.slice(0,item.storageId.indexOf('-'))
|
|
|
- console.log(item.storageId.slice(0,item.storageId.indexOf('-')))
|
|
|
- }
|
|
|
+ // 把库区拼接的id拆开
|
|
|
+ for (let item of this.form.orderItemsList) {
|
|
|
+ console.log(item.storageId, item.storageId.indexOf('-'), 3151)
|
|
|
+ item.storageId = item.storageId.slice(0, item.storageId.indexOf('-'))
|
|
|
+ console.log(item.storageId.slice(0, item.storageId.indexOf('-')))
|
|
|
+ }
|
|
|
|
|
|
typeSave(this.form).then(res => {
|
|
|
if (!other) {
|
|
|
@@ -3258,9 +3483,9 @@ export default {
|
|
|
this.beforeBillData(true, type)
|
|
|
this.applySettlementDialog = true;
|
|
|
}
|
|
|
- }).catch(()=>{
|
|
|
- for(let item of this.form.orderItemsList) {
|
|
|
- item.storageId =item.storageQuantityList.length? item.storageQuantityList[0].storageId:item.storageId
|
|
|
+ }).catch(() => {
|
|
|
+ for (let item of this.form.orderItemsList) {
|
|
|
+ item.storageId = item.storageQuantityList.length ? item.storageQuantityList[0].storageId : item.storageId
|
|
|
}
|
|
|
}).finally(() => {
|
|
|
this.saveLoading = false
|
|
|
@@ -3567,6 +3792,15 @@ export default {
|
|
|
}
|
|
|
return sums;
|
|
|
},
|
|
|
+ tabHandleDL(data) {
|
|
|
+ if (data.name == 'searchList') {
|
|
|
+ this.DLListShow = this.data;
|
|
|
+ this.page.total = this.pageList.total
|
|
|
+ } else if (data.name == 'importStaging') {
|
|
|
+ this.DLListShow = this.DLListSave;
|
|
|
+ this.page.total = 0
|
|
|
+ }
|
|
|
+ },
|
|
|
// 标签页切换
|
|
|
tabHandle(data) {
|
|
|
if (data.name == 'searchList') {
|
|
|
@@ -3920,19 +4154,19 @@ export default {
|
|
|
goodsId: item.itemId,
|
|
|
itemType: item.itemType ? item.itemType : item.typeno,
|
|
|
tradeType: 'GN',
|
|
|
- storageId: item.storageId.slice(0,item.storageId.indexOf('-'))
|
|
|
+ storageId: item.storageId.slice(0, item.storageId.indexOf('-'))
|
|
|
}).then(res => {
|
|
|
if (res.data.data.length > 0) {
|
|
|
- res.data.data.forEach(e=>{
|
|
|
- e.storageId = e.storageId + '-' + e.corpId
|
|
|
- })
|
|
|
+ res.data.data.forEach(e => {
|
|
|
+ e.storageId = e.storageId + '-' + e.corpId
|
|
|
+ })
|
|
|
item.storageQuantityList = res.data.data
|
|
|
item.storageId = res.data.data[0].storageId
|
|
|
item.storageName = res.data.data[0].storageName
|
|
|
item.storageQuantity = res.data.data[0].surplusRouteQuantity
|
|
|
- // 获取供应商名称
|
|
|
- item.corpId = res.data.data[0].corpId
|
|
|
- item.corpName = res.data.data[0].corpName
|
|
|
+ // 获取供应商名称
|
|
|
+ item.corpId = res.data.data[0].corpId
|
|
|
+ item.corpName = res.data.data[0].corpName
|
|
|
if (res.data.data[0].tenantId !== "681169") {
|
|
|
item.purchaseAmount = res.data.data[0].stockPrice
|
|
|
}
|
|
|
@@ -3940,7 +4174,7 @@ export default {
|
|
|
|
|
|
})
|
|
|
})
|
|
|
- console.log(this.goodsShowData,3885)
|
|
|
+ console.log(this.goodsShowData, 3885)
|
|
|
this.$message.success('刷新成功')
|
|
|
},
|
|
|
// 导入政策下载模板
|