diff --git a/src/views/information/business/order.vue b/src/views/information/business/order.vue index f353d62..837e349 100644 --- a/src/views/information/business/order.vue +++ b/src/views/information/business/order.vue @@ -1,90 +1,127 @@ - - +
{{ totalPv }}
+
- - - - - - +
{{ totalBv }}
+
+ +
- +
- - {{'取消'}} - {{ '免签' }} - {{ '免付' }} - {{ '全免' }} - {{'确认'}} + + {{ '取消' }} + {{ '免签' }} + {{ '免付' }} + {{ '全免' }} + {{ '确认' }} - - - - - - - - - - - - - - + + + + + + + + -
- +
+ - + - + - - {{'取消'}} - {{'确认'}} + + {{ '取消' }} + {{ '确认' }} - - - + + + + + + + - + + - + + - - + + - - - - - - - - - - - + + - - {{'取消'}} - {{'确认'}} + + {{ '取消' }} + {{ '确认' }} - - - - - - - - - - - - - - - - - - + + + + + + + + + + -
- +
+ - + - - {{'取消'}} + + {{ '取消' }} {{ '免签' }} + >{{ '免签' }} {{ '免付' }} + >{{ '免付' }} {{ '全免' }} - {{'确认'}} + >{{ '全免' }} + {{ '确认' }} - - - - - - - - - - - - - + + + + + + + + -
- +
+ - + - - {{'取消'}} + + {{ '取消' }} {{ '免签' }} + >{{ '免签' }} {{ '免付' }} + >{{ '免付' }} {{ '全免' }} - {{'确认'}} + >{{ '全免' }} + {{ '确认' }} - - - - - - - - - - + + + + + + - - {{'取消'}} + + {{ '取消' }} {{ '免签' }} + >{{ '免签' }} {{ '免付' }} + >{{ '免付' }} {{ '全免' }} - {{'确认'}} + >{{ '全免' }} + {{ '确认' }}
@@ -1164,7 +1493,7 @@ import { productData, returnData, returnDataMerge, - toCancelOrder, + toCancelOrder } from '@/api/business' import { mapGetters } from 'vuex' @@ -1173,7 +1502,7 @@ import { isLocals, isLocalSymbol } from '@/utils/numberToCurrency' export default { name: 'Ddyw', components: { - topBar, + topBar }, data() { return { @@ -1215,13 +1544,13 @@ export default { { name: '基础业务', path: 'jcyw', - url: 'BasicBusiness', + url: 'BasicBusiness' }, { name: '订单业务', path: 'ddyw', - url: 'OrderBusiness', - }, + url: 'OrderBusiness' + } // { // name: '确认业务', // path: 'shyw', @@ -1245,7 +1574,7 @@ export default { recAddress: '', shoppingAddress: [], creationTime: [], - payTime: [], + payTime: [] }, isActive: false, total: 0, @@ -1255,7 +1584,7 @@ export default { label: 'name', value: 'id', children: 'children', - expandTrigger: 'hover', + expandTrigger: 'hover' }, upload: { // 是否显示弹出层(物流导入) @@ -1270,7 +1599,7 @@ export default { headers: { Authorization: 'Bearer ' + getToken() }, // 上传的地址 url: - process.env.VUE_APP_BASE_API + '/sale/manage/order-business/import', + process.env.VUE_APP_BASE_API + '/sale/manage/order-business/import' }, // 非多个禁用 multiple: true, @@ -1279,15 +1608,9 @@ export default { totalPv: 0, totalBv: 0, yesNoList: [], - multipleSelection:[] + multipleSelection: [] } }, - created() { - this.getData() - this.getUserRoute() - // this.getPayTime() - // this.getSearch() - }, watch: { newGoodsList: { handler(n) { @@ -1304,11 +1627,17 @@ export default { this.totalPv = totalPv this.totalBv = totalBv }, - deep: true, - }, + deep: true + } + }, + created() { + this.getData() + this.getUserRoute() + // this.getPayTime() + // this.getSearch() }, computed: { - ...mapGetters(['getUser']), + ...mapGetters(['getUser']) }, methods: { getUserRoute() { @@ -1339,15 +1668,15 @@ export default { }, isLocalSymbol, getPayTime() { - let date = new Date() - let year = date.getFullYear() + const date = new Date() + const year = date.getFullYear() let month = date.getMonth() + 1 month = month >= 10 ? month : '0' + month let day = date.getDate() day = day >= 10 ? day : '0' + day this.$set(this.queryParams, 'payTime', [ `${year}-${month}-01`, - `${year}-${month}-${day}`, + `${year}-${month}-${day}` ]) // this.getSearch() }, @@ -1361,7 +1690,7 @@ export default { addressCheck({ orderList: this.torderCodeList }).then((res) => { if (res.code != 200) return false // 把地址id转成汉字地址 - let arr = this.flatten(this.areaData) + const arr = this.flatten(this.areaData) this.checkAdressList.forEach((btem) => { btem.nameList = '' arr.forEach((item) => { @@ -1379,26 +1708,26 @@ export default { if (index == 0) { obj = { itemList: this.checkAdressList, - payFlag: 1, + payFlag: 1 } this.$router.push({ path: '/information/business/addressZxqc', query: { data: JSON.stringify(obj), - index: 231, - }, + index: 231 + } }) // 免签 payFlag == 1 } else if (index == 1) { obj = { itemList: this.checkAdressList, - payFlag: 1, + payFlag: 1 } api.addressFree([obj]).then((res) => { if (res.code == 200) { this.$message({ message: res.msg, - type: 'success', + type: 'success' }) this.checkAdress = false this.getSearch() @@ -1408,26 +1737,26 @@ export default { } else if (index == 2) { obj = { itemList: this.checkAdressList, - payFlag: 0, + payFlag: 0 } this.$router.push({ path: '/information/business/addressZxqc', query: { data: JSON.stringify(obj), - index: 231, - }, + index: 231 + } }) // 全免 payFlag == 0 } else if (index == 3) { obj = { itemList: this.checkAdressList, - payFlag: 0, + payFlag: 0 } api.addressFree([obj]).then((res) => { if (res.code == 200) { this.$message({ message: res.msg, - type: 'success', + type: 'success' }) this.checkAdress = false this.getSearch() @@ -1436,7 +1765,7 @@ export default { } }) }, - //修改地址 + // 修改地址 updateAdress(order) { if (order == 1) { this.torderCodeList = this.orderCodes.join(',') @@ -1451,7 +1780,7 @@ export default { this.$set(item, 'ssq', [ item.recProvince + '', item.recCity + '', - item.recCounty + '', + item.recCounty + '' ]) } else { this.$set(item, 'ssq', [item.recProvince + '', item.recCity + '']) @@ -1460,7 +1789,7 @@ export default { this.checkAdressList = res.data this.oCheckAdressList = JSON.parse(JSON.stringify(res.data)) // 把地址id转成汉字地址 - let arr = this.flatten(this.areaData) + const arr = this.flatten(this.areaData) this.oCheckAdressList.forEach((btem) => { btem.nameList = '' arr.forEach((item) => { @@ -1507,7 +1836,7 @@ export default { this.allGoodsList = res.data this.oldGoodsList = JSON.parse(JSON.stringify(res.data.detailList)) this.newGoodsList = JSON.parse(JSON.stringify(res.data.detailList)) - let arr = this.newGoodsList.map((item) => { + const arr = this.newGoodsList.map((item) => { return item.productCode }) if (arr.length > 0) { @@ -1607,7 +1936,7 @@ export default { this.getSku([e], index) }, addNewItem() { - let obj = { + const obj = { achievement: 0, assAchievement: 0, cost: this.allGoodsList.memberCode.cost, @@ -1628,7 +1957,7 @@ export default { quantity: 1, specs: [], specsName: '', - visible: false, + visible: false } this.newGoodsList.push(obj) this.getColSpanData('orderCode', this.newGoodsList, 3) @@ -1638,11 +1967,11 @@ export default { }, // 删除指定数组 delTableList() { - let single = this.newGoodsSelList.some((item) => item.editFlag == 1) + const single = this.newGoodsSelList.some((item) => item.editFlag == 1) if (single) { this.$message({ message: '所选行含有不可编辑项', - type: 'warning', + type: 'warning' }) } else { this.newGoodsSelList.forEach((item) => { @@ -1660,19 +1989,19 @@ export default { ) addressCheck({ orderList: this.torderCodeList }).then((res) => { if (res.code != 200) return false - let arr = [] + const arr = [] if (this.oldGoodsList.length > this.newGoodsList.length) { for (let i = 0; i < this.oldGoodsList.length; i++) { arr.push({ oldList: '', - newList: '', + newList: '' }) } } else { for (let i = 0; i < this.newGoodsList.length; i++) { arr.push({ oldList: '', - newList: '', + newList: '' }) } } @@ -1691,14 +2020,14 @@ export default { obj = { itemList: this.newGoodsList, tableList: [this.allGoodsList], - payFlag: 1, + payFlag: 1 } this.$router.push({ path: '/information/business/dhZxqc', query: { data: JSON.stringify(obj), - index: 232, - }, + index: 232 + } }) } else if (index == 1) { obj = { @@ -1706,13 +2035,13 @@ export default { orderCode: this.allGoodsList.orderCode, postage: this.allGoodsList.postage, tableList: [this.allGoodsList], - payFlag: 1, + payFlag: 1 } api.productFree([obj]).then((res) => { if (res.code == 200) { this.$message({ message: res.msg, - type: 'success', + type: 'success' }) this.isChangeGoods = false this.getSearch() @@ -1722,14 +2051,14 @@ export default { obj = { itemList: this.newGoodsList, tableList: [this.allGoodsList], - payFlag: 0, + payFlag: 0 } this.$router.push({ path: '/information/business/dhZxqc', query: { data: JSON.stringify(obj), - index: 232, - }, + index: 232 + } }) } else if (index == 3) { obj = { @@ -1737,13 +2066,13 @@ export default { orderCode: this.allGoodsList.orderCode, postage: this.allGoodsList.postage, tableList: [this.allGoodsList], - payFlag: 0, + payFlag: 0 } api.productFree([obj]).then((res) => { if (res.code == 200) { this.$message({ message: res.msg, - type: 'success', + type: 'success' }) this.isChangeGoods = false this.getSearch() @@ -1767,8 +2096,8 @@ export default { }, // 合并行数据处理 getColSpanData(prop, datas, index) { - let rowIndexArr = [] - let colSpanArr = [] + const rowIndexArr = [] + const colSpanArr = [] let colLength = 1 datas.forEach((element, index) => { if (index == 0) { @@ -1823,7 +2152,7 @@ export default { if (rowIndex == this.rowIndexArr[i]) { return { rowspan: this.colSpanArr[i], - colspan: 1, + colspan: 1 } } else { if ( @@ -1832,7 +2161,7 @@ export default { ) { return { rowspan: 0, - colspan: 0, + colspan: 0 } } } @@ -1846,7 +2175,7 @@ export default { if (rowIndex == this.rowIndexArr1[i]) { return { rowspan: this.colSpanArr1[i], - colspan: 1, + colspan: 1 } } else { if ( @@ -1855,7 +2184,7 @@ export default { ) { return { rowspan: 0, - colspan: 0, + colspan: 0 } } } @@ -1869,7 +2198,7 @@ export default { if (rowIndex == this.rowIndexArr3[i]) { return { rowspan: this.colSpanArr3[i], - colspan: 1, + colspan: 1 } } else { if ( @@ -1878,7 +2207,7 @@ export default { ) { return { rowspan: 0, - colspan: 0, + colspan: 0 } } } @@ -1892,7 +2221,7 @@ export default { if (rowIndex == this.rowIndexArr2[i]) { return { rowspan: this.colSpanArr2[i], - colspan: 1, + colspan: 1 } } else { if ( @@ -1901,7 +2230,7 @@ export default { ) { return { rowspan: 0, - colspan: 0, + colspan: 0 } } } @@ -1915,7 +2244,7 @@ export default { if (rowIndex == this.rowIndexArr4[i]) { return { rowspan: this.colSpanArr4[i], - colspan: 1, + colspan: 1 } } else { if ( @@ -1924,7 +2253,7 @@ export default { ) { return { rowspan: 0, - colspan: 0, + colspan: 0 } } } @@ -1936,7 +2265,7 @@ export default { this.upload.title = '订单业务导入' this.upload.open = true }, - //下载模板 + // 下载模板 importTemplate() { this.download( '/sale/manage/order-business/template', @@ -1972,7 +2301,7 @@ export default { recAddress: '', shoppingAddress: [], creationTime: [], - payTime: [], + payTime: [] } // this.getSearch() this.tableData = [] @@ -2034,7 +2363,7 @@ export default { this.upload.isUploading = false this.$refs.upload.clearFiles() this.$alert(response.msg, '导入结果', { - dangerouslyUseHTMLString: true, + dangerouslyUseHTMLString: true }) // this.getList(); }, @@ -2051,7 +2380,7 @@ export default { cancelOrder(order, index) { if (index == 1) { returnData({ - orderCode: order, + orderCode: order }).then((res) => { this.returnCodeList = res.data this.getColSpanData( @@ -2064,7 +2393,7 @@ export default { }) } else { returnDataMerge({ - orderCode: order, + orderCode: order }).then((res) => { this.returnCodeList = res.data this.getColSpanData('orderCode', this.returnCodeList, 2) @@ -2078,16 +2407,16 @@ export default { if (index == 1) { checkHassign(233).then((res) => { if (res.code == 200) { - let obj = { + const obj = { form: this.returnForm, - returnCodeList: this.returnCodeList, + returnCodeList: this.returnCodeList } this.$router.push({ path: '/information/business/tdZxqc', query: { data: JSON.stringify(obj), - index: 233, - }, + index: 233 + } }) } }) @@ -2099,8 +2428,8 @@ export default { path: '/information/business/hbtdZxqc', query: { data: JSON.stringify(this.returnCodeList), - index: 233, - }, + index: 233 + } }) } }) @@ -2158,7 +2487,7 @@ export default { savemergeBackOrder(index) { api .validateBind({ - orderCode: this.mergebackCodeList.orderCode, + orderCode: this.mergebackCodeList.orderCode }) .then((res) => { if (res.code == 200) { @@ -2168,13 +2497,13 @@ export default { cancelType: this.mergebackCodeList.cancelType, cancelRoad: index, orderCode: this.mergebackCodeList.orderCode, - signType: 1, + signType: 1 }) .then((response) => { if (response.code == 200) { this.$message({ message: res.msg, - type: 'success', + type: 'success' }) this.mergeBackOrder = false this.getSearch() @@ -2186,15 +2515,15 @@ export default { query: { data: JSON.stringify([this.mergebackCodeList]), index: 234, - cancelRoad: index, - }, + cancelRoad: index + } }) } } else { this.$confirm(res.msg, '警告', { confirmButtonText: '确定', cancelButtonText: '取消', - type: 'warning', + type: 'warning' }).then((_) => { if (index == 1 || index == 3) { api @@ -2202,13 +2531,13 @@ export default { cancelType: this.mergebackCodeList.cancelType, cancelRoad: index, orderCode: this.mergebackCodeList.orderCode, - signType: 1, + signType: 1 }) .then((response) => { if (response.code == 200) { this.$message({ message: res.msg, - type: 'success', + type: 'success' }) this.mergeBackOrder = false this.getSearch() @@ -2220,8 +2549,8 @@ export default { query: { data: JSON.stringify([this.mergebackCodeList]), index: 234, - cancelRoad: index, - }, + cancelRoad: index + } }) } }) @@ -2232,7 +2561,7 @@ export default { saveBackkOrder(index) { api .validateBind({ - orderCode: this.backCodeList.orderCode, + orderCode: this.backCodeList.orderCode }) .then((res) => { if (res.code == 200) { @@ -2243,13 +2572,13 @@ export default { cancelRoad: index, orderCode: this.backCodeList.orderCode, signType: 1, - remark: this.backForm.returnRemark, + remark: this.backForm.returnRemark }) .then((response) => { if (response.code == 200) { this.$message({ message: res.msg, - type: 'success', + type: 'success' }) this.isBackOrder = false this.getSearch() @@ -2261,15 +2590,15 @@ export default { query: { data: JSON.stringify([this.backCodeList]), index: 234, - cancelRoad: index, - }, + cancelRoad: index + } }) } } else { this.$confirm(res.msg, '警告', { confirmButtonText: '确定', cancelButtonText: '取消', - type: 'warning', + type: 'warning' }).then((_) => { if (index == 1 || index == 3) { api @@ -2278,13 +2607,13 @@ export default { cancelRoad: index, orderCode: this.backCodeList.orderCode, signType: 1, - remark: this.backForm.returnRemark, + remark: this.backForm.returnRemark }) .then((response) => { if (response.code == 200) { this.$message({ message: res.msg, - type: 'success', + type: 'success' }) this.isBackOrder = false this.getSearch() @@ -2296,8 +2625,8 @@ export default { query: { data: JSON.stringify([this.backCodeList]), index: 234, - cancelRoad: index, - }, + cancelRoad: index + } }) } }) @@ -2309,17 +2638,17 @@ export default { if (this.backProductList.selProdyctList.length == 0) { this.$message({ message: '请选择需要撤销的产品', - type: 'warning', + type: 'warning' }) return false } - let arr = this.backProductList.selProdyctList.map((res) => { + const arr = this.backProductList.selProdyctList.map((res) => { return res.pkId }) api .validateBind({ orderCode: this.backProductList.selProdyctList[0].orderCode, - itemIdList: arr, + itemIdList: arr }) .then((res) => { if (res.code == 200) { @@ -2332,13 +2661,13 @@ export default { signType: 1, remark: this.backForm.returnRemark, orderCancelDetailParamList: - this.backProductList.selProdyctList, + this.backProductList.selProdyctList }) .then((response) => { if (response.code == 200) { this.$message({ message: res.msg, - type: 'success', + type: 'success' }) this.isBackProduct = false this.getSearch() @@ -2350,15 +2679,15 @@ export default { query: { data: JSON.stringify([this.backProductList]), index: 235, - cancelRoad: index, - }, + cancelRoad: index + } }) } } else { this.$confirm(res.msg, '警告', { confirmButtonText: '确定', cancelButtonText: '取消', - type: 'warning', + type: 'warning' }).then((_) => { if (index == 1 || index == 3) { api @@ -2369,13 +2698,13 @@ export default { signType: 1, remark: this.backForm.returnRemark, orderCancelDetailParamList: - this.backProductList.selProdyctList, + this.backProductList.selProdyctList }) .then((response) => { if (response.code == 200) { this.$message({ message: res.msg, - type: 'success', + type: 'success' }) this.isBackProduct = false this.getSearch() @@ -2387,8 +2716,8 @@ export default { query: { data: JSON.stringify([this.backProductList]), index: 235, - cancelRoad: index, - }, + cancelRoad: index + } }) } }) @@ -2397,8 +2726,8 @@ export default { }, selProduct(e) { this.backProductList.selProdyctList = e - }, - }, + } + } }