|
|
@@ -15,7 +15,8 @@
|
|
|
审核处理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <!-- <el-dropdown-item :disabled="browse || detailData.seeDisabled" @click.native="pleaseCheck">请核数据</el-dropdown-item> -->
|
|
|
+ <el-dropdown-item :disabled="form.status != 0 && !form.id"
|
|
|
+ @click.native="pleaseCheck">请核数据</el-dropdown-item>
|
|
|
<el-dropdown-item v-if="form.status > 0"
|
|
|
@click.native="checkScheduleDialog = true, checkId = form.id">审核进度</el-dropdown-item>
|
|
|
<!-- <el-dropdown-item v-if="form.status == 1" @click.native="repealCancel">撤销请核</el-dropdown-item>
|
|
|
@@ -468,7 +469,9 @@ import {
|
|
|
getProfit,
|
|
|
pleaseCheck,
|
|
|
repealCancel,
|
|
|
- removeList
|
|
|
+ removeList,
|
|
|
+ getCorp,
|
|
|
+ checkAgencyOrderDL,
|
|
|
} from "@/api/basicData/configuration"
|
|
|
import { detail } from "@/api/basicData/proxyOrder"
|
|
|
import { getList } from "@/api/basicData/commodityType";
|
|
|
@@ -1086,6 +1089,30 @@ export default {
|
|
|
// ]
|
|
|
// },
|
|
|
{
|
|
|
+ label: '客户全称',
|
|
|
+ prop: 'corpId',
|
|
|
+ span: 8,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '到货地址',
|
|
|
+ prop: 'arrivalAddress',
|
|
|
+ span: 16,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '品牌',
|
|
|
prop: 'brand',
|
|
|
type: "select",
|
|
|
@@ -1128,30 +1155,6 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- {
|
|
|
- label: '客户全称',
|
|
|
- prop: 'corpId',
|
|
|
- span: 8,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'change'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '到货地址',
|
|
|
- prop: 'arrivalAddress',
|
|
|
- span: 16,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
// {
|
|
|
// label: '生产工厂',
|
|
|
// prop: 'productionPlant',
|
|
|
@@ -1334,8 +1337,8 @@ export default {
|
|
|
policyName: '',
|
|
|
salesType: 1
|
|
|
},
|
|
|
- baseURL: '/api/blade-purchase-sales/orderitems/importPrice', // 商品明细上传路径
|
|
|
- policyUrl: '/api/blade-purchase-sales/orderitems/importPolicy', // 导入政策上传路径
|
|
|
+ baseURL: '/api/blade-purchase-sales/orderitems/importAgency', // 商品明细上传路径
|
|
|
+ policyUrl: '/api/blade-purchase-sales/orderitems/importAgency ', // 导入政策上传路径
|
|
|
headers: { "Blade-Auth": 'Bearer ' + getToken() },
|
|
|
activeName: 'searchList',
|
|
|
// 商品列表数据合计
|
|
|
@@ -1489,7 +1492,7 @@ export default {
|
|
|
itemType: event.typeno,
|
|
|
tradeType: 'GN'
|
|
|
}).then(res => {
|
|
|
- row.storageQuantity = res.data.data.length?res.data.data[0].balanceQuantity:0
|
|
|
+ row.storageQuantity = res.data.data.length ? res.data.data[0].balanceQuantity : 0
|
|
|
})
|
|
|
row.integralMultiples = event.integralMultiples
|
|
|
this.quantityChange(row)
|
|
|
@@ -1764,13 +1767,14 @@ export default {
|
|
|
},
|
|
|
// 下载模板
|
|
|
downloadHandle() {
|
|
|
+ if (!this.form.brand) return this.$message.error('请选择品牌')
|
|
|
this.$confirm('是否下载模板文件?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
window.open(
|
|
|
- `/api/blade-purchase-sales/orderitems/exportPrice?${this.website.tokenHeader
|
|
|
+ `/api/blade-purchase-sales/orderitems/exportAgency?brand=${this.form.brand}&${this.website.tokenHeader
|
|
|
}=${getToken()}`
|
|
|
);
|
|
|
}).catch(() => {
|
|
|
@@ -1811,6 +1815,9 @@ export default {
|
|
|
this.$set(item, 'price', '0')
|
|
|
this.$set(item, 'amount', '0')
|
|
|
this.$set(item, 'sort', this.maxFeeNum + 1)
|
|
|
+ if (this.goodsShowData.find(e => e.code == item.code)) {
|
|
|
+ this.$set(item, 'id', this.goodsShowData.find(e => e.code == item.code).id)
|
|
|
+ }
|
|
|
this.maxFeeNum++
|
|
|
let a = {
|
|
|
...item,
|
|
|
@@ -1819,7 +1826,7 @@ export default {
|
|
|
})
|
|
|
this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.concat(goodsData)
|
|
|
this.removeGoodsRepeat()
|
|
|
- this.goodsShowData = this.goodsShowData.concat(res.data)
|
|
|
+ this.goodsShowData = res.data
|
|
|
|
|
|
},
|
|
|
// 政策导入成功钩子
|
|
|
@@ -2056,6 +2063,8 @@ export default {
|
|
|
this.userList = res.data.data;
|
|
|
})
|
|
|
khDetail(data.id).then(res => {
|
|
|
+ console.log(res.data.data)
|
|
|
+ this.$set(this.form, 'brand', res.data.data.goodtypes);
|
|
|
if (res.data.data.adminProfiles) {
|
|
|
res.data.data.adminProfiles = res.data.data.adminProfiles.split(",");
|
|
|
let arr = [];
|
|
|
@@ -2119,7 +2128,7 @@ export default {
|
|
|
itemType: event[0].typeno,
|
|
|
tradeType: 'GN'
|
|
|
}).then(res => {
|
|
|
- row.storageQuantity = res.data.data.length?res.data.data[0].balanceQuantity:0
|
|
|
+ row.storageQuantity = res.data.data.length ? res.data.data[0].balanceQuantity : 0
|
|
|
})
|
|
|
row.integralMultiples = event[0].integralMultiples
|
|
|
this.quantityChange(row)
|
|
|
@@ -2149,7 +2158,7 @@ export default {
|
|
|
itemType: this.tableData[0].typeno,
|
|
|
tradeType: 'GN'
|
|
|
}).then(res => {
|
|
|
- this.goodsShowData[this.choiceIndexT].storageQuantity = res.data.data.length?res.data.data[0].balanceQuantity:0
|
|
|
+ this.goodsShowData[this.choiceIndexT].storageQuantity = res.data.data.length ? res.data.data[0].balanceQuantity : 0
|
|
|
})
|
|
|
}
|
|
|
this.dialogVisible = !this.dialogVisible
|
|
|
@@ -2218,7 +2227,7 @@ export default {
|
|
|
itemType: this.goodsListSave[item].typeno,
|
|
|
tradeType: 'GN'
|
|
|
}).then(res => {
|
|
|
- this.$set(this.goodsListSave[item], 'storageQuantity', res.data.data.length?res.data.data[0].balanceQuantity:0)
|
|
|
+ this.$set(this.goodsListSave[item], 'storageQuantity', res.data.data.length ? res.data.data[0].balanceQuantity : 0)
|
|
|
// this.goodsListSave[item].storageQuantity = res.data.data
|
|
|
this.$set(this.goodsListSave[item], 'priceCategory', this.goodsListSave[item].goodsTypeName)
|
|
|
// this.goodsListSave[item].priceCategory = this.goodsListSave[item].goodsTypeName
|
|
|
@@ -2288,7 +2297,7 @@ export default {
|
|
|
tradeType: 'GN'
|
|
|
}).then(res => {
|
|
|
this.tableData[item].priceCategory = this.tableData[item].goodsTypeName;
|
|
|
- this.tableData[item].storageQuantity = res.data.data.length?res.data.data[0].balanceQuantity:0;
|
|
|
+ this.tableData[item].storageQuantity = res.data.data.length ? res.data.data[0].balanceQuantity : 0;
|
|
|
delete this.tableData[item].goodsTypeName;
|
|
|
this.tableData[item].itemId = this.tableData[item].id;
|
|
|
this.$set(this.tableData[item], 'corpName', this.tableData[item].corpName);
|
|
|
@@ -2461,9 +2470,9 @@ export default {
|
|
|
itemType: list[item].typeno,
|
|
|
tradeType: 'GN'
|
|
|
}).then(res => {
|
|
|
- this.$set(list[item], 'storageQuantity', res.data.data.length?res.data.data[0].balanceQuantity:0)
|
|
|
+ this.$set(list[item], 'storageQuantity', res.data.data.length ? res.data.data[0].balanceQuantity : 0)
|
|
|
if (listLength != 0) {
|
|
|
- this.$set(buyFree[item], 'storageQuantity', res.data.data.length?res.data.data[0].balanceQuantity:0)
|
|
|
+ this.$set(buyFree[item], 'storageQuantity', res.data.data.length ? res.data.data[0].balanceQuantity : 0)
|
|
|
}
|
|
|
|
|
|
this.$set(list[item], 'itemType', list[item].typeno)
|
|
|
@@ -2732,12 +2741,12 @@ export default {
|
|
|
if (valid) {
|
|
|
const length = this.goodsActives === 'gift' ? this.contactsData.length : this.goodsShowData.length
|
|
|
const length1 = this.goodsActives === 'goods' ? this.giftData : this.goodsShowData
|
|
|
- for (let i = 0; i < length; i++) {
|
|
|
- const data = this.goodsActives === 'gift' ? this.contactsData : this.goodsShowData;
|
|
|
- if (Number(data[i].orderQuantity) > Number(data[i].storageQuantity)) {
|
|
|
- return this.$message.error('商品信息第' + (Number(i) + 1) + '行订货数量大于库存数量')
|
|
|
- }
|
|
|
- }
|
|
|
+ // for (let i = 0; i < length; i++) {
|
|
|
+ // const data = this.goodsActives === 'gift' ? this.contactsData : this.goodsShowData;
|
|
|
+ // if (Number(data[i].orderQuantity) > Number(data[i].storageQuantity)) {
|
|
|
+ // return this.$message.error('商品信息第' + (Number(i) + 1) + '行订货数量大于库存数量')
|
|
|
+ // }
|
|
|
+ // }
|
|
|
let integral = 0;//积分
|
|
|
if (length1) {
|
|
|
length1.forEach(item => {
|
|
|
@@ -3239,22 +3248,21 @@ export default {
|
|
|
pleaseCheck() {
|
|
|
const giftList = this.goodsActives == 'gift' ? this.goodsShowData : this.giftData
|
|
|
if (this.verification()) {
|
|
|
- this.$confirm(giftList.length == 0 ? "此单没有赠品,确定提交此次审批吗?" : "您确定提交此次申请吗?", {
|
|
|
+ this.$confirm("您确定提交此次申请吗?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
const data = {
|
|
|
id: this.form.id,
|
|
|
- checkType: 'dlqh',
|
|
|
+ checkType: 'DLDD',
|
|
|
url: '/businessManagement/proxyOrder/index',
|
|
|
pageStatus: "this.$store.getters.domSaleStatus",
|
|
|
pageLabel: "采购计划(N)",
|
|
|
- checkFlag: 2,
|
|
|
}
|
|
|
this.pageLoading = true
|
|
|
this.saveLoading = true
|
|
|
- pleaseCheck(data).then(res => {
|
|
|
+ checkAgencyOrderDL(data).then(res => {
|
|
|
this.$message.success('请核成功')
|
|
|
this.saveActives = ''
|
|
|
this.queryData(this.form.id)
|
|
|
@@ -3433,7 +3441,7 @@ export default {
|
|
|
tradeType: 'GN',
|
|
|
storageId: this.form.storageId
|
|
|
}).then(res => {
|
|
|
- item.storageQuantity = res.data.data.length?res.data.data[0].balanceQuantity:0
|
|
|
+ item.storageQuantity = res.data.data.length ? res.data.data[0].balanceQuantity : 0
|
|
|
})
|
|
|
})
|
|
|
this.$message.success('刷新成功')
|
|
|
@@ -3446,7 +3454,7 @@ export default {
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
window.open(
|
|
|
- `/api/blade-purchase-sales/orderitems/policy?${this.website.tokenHeader
|
|
|
+ `/api/blade-purchase-sales/orderitems/exportAgency?${this.website.tokenHeader
|
|
|
}=${getToken()}`
|
|
|
);
|
|
|
})
|