|
|
@@ -23,7 +23,7 @@
|
|
|
审核处理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item :disabled="true">请核数据</el-dropdown-item>
|
|
|
+ <el-dropdown-item :disabled="form.status > 0" @click.native="pleaseCheck">请核数据</el-dropdown-item>
|
|
|
<el-dropdown-item v-if="false">审核进度</el-dropdown-item>
|
|
|
<el-dropdown-item v-if="false">撤销请核</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
@@ -352,7 +352,7 @@
|
|
|
<el-button type="warning"
|
|
|
icon="el-icon-plus"
|
|
|
size="small"
|
|
|
- :disabled="selection.length < 1 || detailData.seeDisabled"
|
|
|
+ :disabled="selection.length < 1 || detailData.seeDisabled || form.status != 3"
|
|
|
@click="getShipmentD"
|
|
|
v-show="goodsActives == 'goods'">生成客户确认
|
|
|
</el-button>
|
|
|
@@ -364,6 +364,12 @@
|
|
|
v-show="goodsActives == 'goods'"
|
|
|
>报 表</el-button>
|
|
|
<el-button
|
|
|
+ type="info"
|
|
|
+ size="small"
|
|
|
+ v-show="goodsActives == 'goods'"
|
|
|
+ @click="exportHandle"
|
|
|
+ >导 出</el-button>
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
icon="el-icon-download"
|
|
|
@@ -379,6 +385,7 @@
|
|
|
accept=".xls,.xlsx"
|
|
|
multiple
|
|
|
:on-success="importTemplate"
|
|
|
+ :on-error="uploadError"
|
|
|
style="float: right"
|
|
|
>
|
|
|
<el-button
|
|
|
@@ -722,12 +729,14 @@ import {
|
|
|
corpsbank,
|
|
|
corpsfiles,
|
|
|
corpsitem,
|
|
|
- getList,
|
|
|
+ // getList,
|
|
|
detailList,
|
|
|
generateShipment,
|
|
|
saveSell,
|
|
|
getlistBankBy,
|
|
|
+ pleaseCheck,
|
|
|
} from "@/api/basicData/configuration"
|
|
|
+import {getList} from "@/api/basicData/commodityType";
|
|
|
import {getCorpDetail} from "@/api/maintenance/overpayment"
|
|
|
import {integralDetail} from "@/api/maintenance/integral"
|
|
|
import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
|
|
|
@@ -1405,6 +1414,7 @@ export default {
|
|
|
orderStatus: "录入"
|
|
|
},
|
|
|
oldGoodsList: [],
|
|
|
+ oldGiftList: [],
|
|
|
oldFeesList: [],
|
|
|
oldUploadList: [],
|
|
|
// 采购价格
|
|
|
@@ -1597,9 +1607,11 @@ export default {
|
|
|
}
|
|
|
this.oldForm = Object.assign({}, this.form)
|
|
|
this.oldGoodsList = []
|
|
|
+ this.oldGiftList = []
|
|
|
this.oldFeesList = []
|
|
|
this.oldUploadList = []
|
|
|
this.oldGoodsList = this.deepClone(this.contactsData)
|
|
|
+ this.oldGiftList = this.deepClone(this.giftData)
|
|
|
this.oldFeesList = this.deepClone(this.advantageProjectData)
|
|
|
this.oldUploadList = this.deepClone(this.bankOfDepositData)
|
|
|
if (isCopy) {
|
|
|
@@ -1652,15 +1664,19 @@ export default {
|
|
|
// 生成采购单
|
|
|
saveSell() {
|
|
|
let getGoodsList = []
|
|
|
+ let getGiftList = []
|
|
|
let getFeeList = this.$refs.feeInfo.submitData()
|
|
|
if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
- getGoodsList = this.goodsShowData.concat(this.contactsData)
|
|
|
+ getGiftList = this.goodsShowData
|
|
|
+ getGoodsList = this.contactsData
|
|
|
} else {
|
|
|
- getGoodsList = this.goodsShowData.concat(this.giftData)
|
|
|
+ getGoodsList = this.goodsShowData
|
|
|
+ getGiftList = this.giftData
|
|
|
}
|
|
|
if (contrastObj(this.form, this.oldForm) ||
|
|
|
contrastList(getGoodsList, this.oldGoodsList) ||
|
|
|
- contrastList(getFeeList, this.oldFeesList) ||
|
|
|
+ contrastList(getGiftList, this.oldGiftList) ||
|
|
|
+ // contrastList(getFeeList, this.oldFeesList) ||
|
|
|
contrastList(this.bankOfDepositData, this.oldUploadList)
|
|
|
) {
|
|
|
this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
|
|
|
@@ -1723,6 +1739,25 @@ export default {
|
|
|
openReport() {
|
|
|
this.switchDialog =! this.switchDialog;
|
|
|
},
|
|
|
+ // 导出
|
|
|
+ exportHandle() {
|
|
|
+ this.$confirm('是否导出产品信息?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ window.open(
|
|
|
+ `/api/blade-client/goodsdesc/export-out-info?${
|
|
|
+ this.website.tokenHeader
|
|
|
+ }=${getToken()}`
|
|
|
+ );
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
// 下载模板
|
|
|
downloadHandle() {
|
|
|
this.$confirm('是否下载模板文件?', '提示', {
|
|
|
@@ -1750,17 +1785,17 @@ export default {
|
|
|
this.openFullScreen(true)
|
|
|
let goodsData = []
|
|
|
res.data.forEach(item => {
|
|
|
- getMarketPrice({code: item.code}).then(res => {
|
|
|
- if (res.data.data.length > 0) {
|
|
|
- this.$set(item, 'price', res.data.data[0].salesPrice)
|
|
|
+ getMarketPrice({code: item.code}).then(response => {
|
|
|
+ if (response.data.data.length > 0) {
|
|
|
+ this.$set(item, 'price', response.data.data[0].salesPrice)
|
|
|
} else {
|
|
|
this.$set(item, 'price', '0')
|
|
|
}
|
|
|
this.$set(item, 'amount', (Number(item.price) * Number(item.orderQuantity)).toFixed(2))
|
|
|
})
|
|
|
- getPurchasePrice({code: item.code}).then(res => {
|
|
|
- if (res.data.data.length > 0) {
|
|
|
- this.$set(item, 'purchaseAmount', res.data.data[0].purchasePrice)
|
|
|
+ getPurchasePrice({code: item.code}).then(response => {
|
|
|
+ if (response.data.data.length > 0) {
|
|
|
+ this.$set(item, 'purchaseAmount', response.data.data[0].purchasePrice)
|
|
|
} else {
|
|
|
this.$set(item, 'purchaseAmount', '0')
|
|
|
}
|
|
|
@@ -1781,6 +1816,10 @@ export default {
|
|
|
this.goodsShowData = this.goodsShowData.concat(res.data)
|
|
|
|
|
|
},
|
|
|
+ uploadError(err, file, fileList) {
|
|
|
+ this.openFullScreen(true)
|
|
|
+ this.$message.error(JSON.parse(err.message).msg)
|
|
|
+ },
|
|
|
//遮罩层
|
|
|
openFullScreen(res, text) {
|
|
|
const loading = this.$loading({
|
|
|
@@ -1815,15 +1854,19 @@ export default {
|
|
|
//生成发货单
|
|
|
async generateShipmentD() {
|
|
|
let getGoodsList = []
|
|
|
+ let getGiftList = []
|
|
|
let getFeeList = this.$refs.feeInfo.submitData()
|
|
|
if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
- getGoodsList = this.goodsShowData.concat(this.contactsData)
|
|
|
+ getGiftList = this.goodsShowData
|
|
|
+ getGoodsList = this.contactsData
|
|
|
} else {
|
|
|
- getGoodsList = this.goodsShowData.concat(this.giftData)
|
|
|
+ getGoodsList = this.goodsShowData
|
|
|
+ getGiftList = this.giftData
|
|
|
}
|
|
|
if (contrastObj(this.form, this.oldForm) ||
|
|
|
contrastList(getGoodsList, this.oldGoodsList) ||
|
|
|
- contrastList(getFeeList, this.oldFeesList) ||
|
|
|
+ contrastList(getGiftList, this.oldGiftList) ||
|
|
|
+ // contrastList(getFeeList, this.oldFeesList) ||
|
|
|
contrastList(this.bankOfDepositData, this.oldUploadList)
|
|
|
) {
|
|
|
this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
|
|
|
@@ -1862,15 +1905,19 @@ export default {
|
|
|
// 生成结算
|
|
|
applySettlement(type) {
|
|
|
let getGoodsList = []
|
|
|
+ let getGiftList = []
|
|
|
let getFeeList = this.$refs.feeInfo.submitData()
|
|
|
if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
- getGoodsList = this.goodsShowData.concat(this.contactsData)
|
|
|
+ getGiftList = this.goodsShowData
|
|
|
+ getGoodsList = this.contactsData
|
|
|
} else {
|
|
|
- getGoodsList = this.goodsShowData.concat(this.giftData)
|
|
|
+ getGoodsList = this.goodsShowData
|
|
|
+ getGiftList = this.giftData
|
|
|
}
|
|
|
if (contrastObj(this.form, this.oldForm) ||
|
|
|
contrastList(getGoodsList, this.oldGoodsList) ||
|
|
|
- contrastList(getFeeList, this.oldFeesList) ||
|
|
|
+ contrastList(getGiftList, this.oldGiftList) ||
|
|
|
+ // contrastList(getFeeList, this.oldFeesList) ||
|
|
|
contrastList(this.bankOfDepositData, this.oldUploadList)
|
|
|
) {
|
|
|
this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
|
|
|
@@ -1878,7 +1925,7 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
- this.editCustomer(true)
|
|
|
+ this.editCustomer(false, type)
|
|
|
}).catch(() => {
|
|
|
})
|
|
|
} else {
|
|
|
@@ -2679,6 +2726,9 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
+ } else if (type == '收费') {
|
|
|
+ this.beforeBillData(true,type)
|
|
|
+ this.applySettlementDialog = true;
|
|
|
}
|
|
|
}).finally(() => {
|
|
|
this.saveLoading = false
|
|
|
@@ -2759,15 +2809,19 @@ export default {
|
|
|
//返回列表
|
|
|
backToList() {
|
|
|
let getGoodsList = []
|
|
|
+ let getGiftList = []
|
|
|
let getFeeList = this.$refs.feeInfo.submitData()
|
|
|
if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
- getGoodsList = this.goodsShowData.concat(this.contactsData)
|
|
|
+ getGiftList = this.goodsShowData
|
|
|
+ getGoodsList = this.contactsData
|
|
|
} else {
|
|
|
- getGoodsList = this.goodsShowData.concat(this.giftData)
|
|
|
+ getGoodsList = this.goodsShowData
|
|
|
+ getGiftList = this.giftData
|
|
|
}
|
|
|
if (contrastObj(this.form, this.oldForm) ||
|
|
|
contrastList(getGoodsList, this.oldGoodsList) ||
|
|
|
- contrastList(getFeeList, this.oldFeesList) ||
|
|
|
+ contrastList(getGiftList, this.oldGiftList) ||
|
|
|
+ // contrastList(getFeeList, this.oldFeesList) ||
|
|
|
contrastList(this.bankOfDepositData, this.oldUploadList)
|
|
|
) {
|
|
|
this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
|
|
|
@@ -2984,6 +3038,59 @@ export default {
|
|
|
params.srcOrderno = this.form.orderNo
|
|
|
callback(params)
|
|
|
},
|
|
|
+ // 请核
|
|
|
+ pleaseCheck() {
|
|
|
+ if (this.verification()) {
|
|
|
+ this.$confirm("您确定提交此次申请吗?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const data = {
|
|
|
+ id : this.form.id,
|
|
|
+ }
|
|
|
+ this.pageLoading = true
|
|
|
+ pleaseCheck(data).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.pageLoading = false
|
|
|
+ }).finally(() => {
|
|
|
+ this.pageLoading = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 验证新旧值对比
|
|
|
+ verification() {
|
|
|
+ let getGoodsList = []
|
|
|
+ let getGiftList = []
|
|
|
+ let getFeeList = this.$refs.feeInfo.submitData()
|
|
|
+ if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
|
|
|
+ getGiftList = this.goodsShowData
|
|
|
+ getGoodsList = this.contactsData
|
|
|
+ } else {
|
|
|
+ getGoodsList = this.goodsShowData
|
|
|
+ getGiftList = this.giftData
|
|
|
+ }
|
|
|
+ if (contrastObj(this.form, this.oldForm) ||
|
|
|
+ contrastList(getGoodsList, this.oldGoodsList) ||
|
|
|
+ contrastList(getGiftList, this.oldGiftList) ||
|
|
|
+ // contrastList(getFeeList, this.oldFeesList) ||
|
|
|
+ contrastList(this.bankOfDepositData, this.oldUploadList)
|
|
|
+ ) {
|
|
|
+ this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.editCustomer(false)
|
|
|
+ }).catch(() => {
|
|
|
+ return false; //取消改动数据
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return true; //没有动过数据
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|