diff --git a/src/api/order.js b/src/api/order.js index e9ef8d0..ad5c070 100644 --- a/src/api/order.js +++ b/src/api/order.js @@ -15,7 +15,12 @@ import request from './request' export function orderListApi(data) { return request.get('store/order/lst', data) } - +/** + * @description 开启退款 + */ +export function openRefundApi(id) { + return request.get(`store/order/open_refund/${id}`) +} /** * @description 订单 -- 表头 */ @@ -163,7 +168,7 @@ export function orderCancellationApi(code) { /** * @description 订单核销 */ - export function goCancellationApi(id, data) { +export function goCancellationApi(id, data) { return request.post(`store/order/verify/${id}`, data) } /** @@ -241,7 +246,7 @@ export function deliveryRecordDetailApi(id, data) { /** * @description 批量发货记录 -- 导出 */ -export function deliveryRecordImportApi(id,data) { +export function deliveryRecordImportApi(id, data) { return request.get(`store/import/excel/${id}`, data) } /** @@ -277,43 +282,43 @@ export function getEleTempData() { /** * @description 发送货 -- 门店列表 */ - export function getStoreLst() { +export function getStoreLst() { return request.get(`delivery/station/select`) } /** * @description 发送货 -- 门店列表 */ - export function getDeliveryStoreLst() { +export function getDeliveryStoreLst() { return request.get(`delivery/station/options`) } /** * @description 同城配送 -- 订单列表 */ - export function deliveryOrderLst(data) { +export function deliveryOrderLst(data) { return request.get(`delivery/order/lst`, data) } /** * @description 同城订单 -- 取消 */ - export function deliveryOrderCancle(id) { +export function deliveryOrderCancle(id) { return request.get(`delivery/order/cancel/${id}/form`) } /** * @description 同城配送 -- 充值记录列表 */ - export function rechargeLst(data) { +export function rechargeLst(data) { return request.get(`delivery/station/payLst`, data) } /** * @description 同城配送 -- 充值 */ - export function rechargeInfoApi(data) { +export function rechargeInfoApi(data) { return request.get(`delivery/station/code`, data) } /** * @description 订单 -- 导出 */ - export function storeOrderApi(data) { +export function storeOrderApi(data) { return request.get(`delivery/station/code`, data) } /** diff --git a/src/views/order/index.vue b/src/views/order/index.vue index 06344f2..e85e789 100644 --- a/src/views/order/index.vue +++ b/src/views/order/index.vue @@ -223,6 +223,7 @@ 编辑 发送货 删除 + 开启退款 去核销 @@ -482,7 +483,8 @@ import { expressLst, exprTempsLst, getEleTempData, - getDeliveryStoreLst + getDeliveryStoreLst, + openRefundApi } from '@/api/order' import createWorkBook from '@/utils/newToExcel.js' import { serveInfoApi } from '@/api/setting' @@ -701,6 +703,35 @@ export default { this.getStoreList() }, methods: { + // 开启退款 + onOrderOpenRefund(id) { + this.$confirm('此操作将开启退款, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + openRefundApi(id).then((res)=>{ + if(res.status == '200'){ + this.$message({ + type: 'success', + message: '开启退款!' + }); + }else{ + this.$message({ + type: 'error', + message: res.message + }); + } + console.log(res, "res"); + }) + // this.$message({ + // type: 'success', + // message: '开启退款!' + // }); + }).catch(() => { + + }); + }, /** 重置 */ searchReset() { this.timeVal = [] diff --git a/src/views/product/addProduct/index.vue b/src/views/product/addProduct/index.vue index 7ab0c66..72e5c0d 100644 --- a/src/views/product/addProduct/index.vue +++ b/src/views/product/addProduct/index.vue @@ -280,7 +280,7 @@ - + -
-
进口企业/境内总代企业资质
- - - - - - - - - 点击上传 - - - - -
品牌方资质
- - - - 点击上传 - - - - -
产品资质
- - - - 点击上传 - - - - - - - - 点击上传 - - - - - - - - 点击上传 - - - - -
生产企业资质
@@ -428,9 +323,8 @@ :on-remove="handleRemoves" :on-success="handleSuccess" :before-upload="beforeUpload" - multiple - :limit="3" - :file-list="businessList" + + :file-list="formValidate.qualification.businessList" > 点击上传 @@ -446,9 +340,8 @@ :on-remove="licenRemoves" :on-success="licenSuccess" :before-upload="beforeUpload" - multiple - :limit="3" - :file-list="licenceList" + + :file-list="formValidate.qualification.licenceList" > 点击上传 @@ -465,9 +358,8 @@ :on-remove="trademarkRemoves" :on-success="trademarkSuccess" :before-upload="beforeUpload" - multiple - :limit="3" - :file-list="trademarkList" + + :file-list="formValidate.qualification.trademarkList" > 点击上传 @@ -483,9 +375,8 @@ :on-remove="authorizedRemoves" :on-success="authorizedSuccess" :before-upload="beforeUpload" - multiple - :limit="3" - :file-list="authorizedList" + + :file-list="formValidate.qualification.authorizedList" > 点击上传 @@ -502,9 +393,8 @@ :on-remove="commodityRemoves" :on-success="commoditySuccess" :before-upload="beforeUpload" - multiple - :limit="3" - :file-list="commodityList" + + :file-list="formValidate.qualification.commodityList" > 点击上传 @@ -520,9 +410,108 @@ :on-remove="otherRemoves" :on-success="otherSuccess" :before-upload="beforeUpload" - multiple - :limit="3" - :file-list="otherList" + + :file-list="formValidate.qualification.otherList" + > + 点击上传 + + + + +
+
+
进口企业/境内总代企业资质
+ + + + + + + + + 点击上传 + + + + +
品牌方资质
+ + + + 点击上传 + + + + +
产品资质
+ + + + 点击上传 + + + + + + + + 点击上传 + + + + + + + 点击上传 @@ -2013,6 +2002,11 @@ export default { type: 'array' } ], + 'qualification.production_name': [ + { + required: true, message: '请输入生产企业名称', trigger: 'blur' + } + ], 'qualification.businessList': [ { required: true, message: '请上传营业执照图片或者PDF', trigger: 'blur' @@ -2274,6 +2268,23 @@ export default { this.setTagsViewTitle() this.getInfo() } else { + this.formValidate.qualification = { + production_name: '', + businessList: [], + licenceList: [], + trademarkList: [], + authorizedList: [], + commodityList: [], + otherList: [], + importBusinessList: [], + importAuthorizedList: [], + customsList: [], + packingList: [], + importOtherList: [], + commodity_type: 0, + brands_name: '', + import_name: '' + } this.getSpecsLst(this.formValidate.cate_id) this.productCon() if (this.deduction_set == -1) this.formValidate.integral_rate = -1 @@ -2293,6 +2304,7 @@ export default { }, methods: { handlCommodity(name) { + console.log(this.importBusinessList); this.$refs[name].clearValidate() }, beforeUpload(file) { @@ -2302,9 +2314,10 @@ export default { } }, handleRemoves(file) { - if (file.response) { + console.log(file); + if (file.url) { this.formValidate.qualification.businessList = this.formValidate.qualification.businessList.filter(res => { - return res.url !== file.response.data.src + return res.url !== file.url }) } }, @@ -2315,9 +2328,9 @@ export default { console.log(this.formValidate.qualification.businessList) }, licenRemoves(file) { - if (file.response) { + if (file.url) { this.formValidate.qualification.licenceList = this.formValidate.qualification.licenceList.filter(res => { - return res.url !== file.response.data.src + return res.url !== file.url }) } }, @@ -2327,9 +2340,9 @@ export default { } }, trademarkRemoves(file) { - if (file.response) { + if (file.url) { this.formValidate.qualification.trademarkList = this.formValidate.qualification.trademarkList.filter(res => { - return res.url !== file.response.data.src + return res.url !== file.url }) } }, @@ -2339,9 +2352,9 @@ export default { } }, authorizedRemoves(file) { - if (file.response) { + if (file.url) { this.formValidate.qualification.authorizedList = this.formValidate.qualification.authorizedList.filter(res => { - return res.url !== file.response.data.src + return res.url !== file.url }) } }, @@ -2351,9 +2364,9 @@ export default { } }, commodityRemoves(file) { - if (file.response) { + if (file.url) { this.formValidate.qualification.commodityList = this.formValidate.qualification.commodityList.filter(res => { - return res.url !== file.response.data.src + return res.url !== file.url }) } }, @@ -2363,9 +2376,9 @@ export default { } }, otherRemoves(file) { - if (file.response) { + if (file.url) { this.formValidate.qualification.otherList = this.formValidate.qualification.otherList.filter(res => { - return res.url !== file.response.data.src + return res.url !== file.url }) } }, @@ -2375,21 +2388,24 @@ export default { } }, importHandleRemoves(file) { - if (file.response) { + console.log(file); + if (file.url) { this.formValidate.qualification.importBusinessList = this.formValidate.qualification.importBusinessList.filter(res => { - return res.url !== file.response.data.src + return res.url !== file.url }) } }, importHandleSuccess(res, file) { + console.log(file); + console.log(res); if (res.status === 200) { this.formValidate.qualification.importBusinessList.push({ name: file.name, url: res.data.src }) } }, importAuthorizedRemoves(file) { - if (file.response) { + if (file.url) { this.formValidate.qualification.importAuthorizedList = this.formValidate.qualification.importAuthorizedList.filter(res => { - return res.url !== file.response.data.src + return res.url !== file.url }) } }, @@ -2404,9 +2420,9 @@ export default { } }, customsRemoves(file) { - if (file.response) { + if (file.url) { this.formValidate.qualification.customsList = this.formValidate.qualification.customsList.filter(res => { - return res.url !== file.response.data.src + return res.url !== file.url }) } }, @@ -2416,9 +2432,9 @@ export default { } }, packingRemoves(file) { - if (file.response) { + if (file.url) { this.formValidate.qualification.packingList = this.formValidate.qualification.packingList.filter(res => { - return res.url !== file.response.data.src + return res.url !== file.url }) } }, @@ -2428,9 +2444,9 @@ export default { } }, importOtherRemoves(file) { - if (file.response) { + if (file.url) { this.formValidate.qualification.importOtherList = this.formValidate.qualification.importOtherList.filter(res => { - return res.url !== file.response.data.src + return res.url !== file.url }) } }, @@ -3378,7 +3394,8 @@ export default { : [], type: info.type || 0, extend: info.extend || [], - svip_price_type: info.svip_price_type || 0 + svip_price_type: info.svip_price_type || 0, + qualification:info.qualification }; if (info.svip_price_type != 0 && info.mer_svip_status) this.attrVal = { @@ -3487,6 +3504,23 @@ export default { this.$router.push({ path: this.roterPre + "/product/list" }); this.$refs[name].resetFields(); this.formValidate.slider_image = []; + this.formValidate.qualification = { + production_name: '', + businessList: [], + licenceList: [], + trademarkList: [], + authorizedList: [], + commodityList: [], + otherList: [], + importBusinessList: [], + importAuthorizedList: [], + customsList: [], + packingList: [], + importOtherList: [], + commodity_type: 0, + brands_name: '', + import_name: '' + } this.loading = false; }) .catch(res => { @@ -3905,4 +3939,7 @@ export default { margin-left: 120px !important; width: auto !important; } +::v-deep .el-upload-list__item { + transition: none !important; +} diff --git a/src/views/product/productList/index.vue b/src/views/product/productList/index.vue index ac634d9..1456814 100644 --- a/src/views/product/productList/index.vue +++ b/src/views/product/productList/index.vue @@ -87,6 +87,22 @@ + + + 搜索 重置 @@ -176,6 +192,7 @@ + +