diff --git a/seller/public/config.js b/seller/public/config.js index 77fabef0..4c4bde61 100644 --- a/seller/public/config.js +++ b/seller/public/config.js @@ -7,10 +7,10 @@ var BASE = { // buyer: "http://localhost:8888", // seller: "http://localhost:8889", // manager: "http://localhost:8887" - common:"http://192.168.0.113:8890", + common:"http://127.0.0.1:8890", buyer:"http://192.168.0.113:8888", manager:"http://192.168.0.113:8887", - seller:"http://192.168.0.113:8889" + seller:"http://127.0.0.1:8889" }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/seller/src/api/logistics.js b/seller/src/api/logistics.js index 1d4d7ebf..a74a861a 100644 --- a/seller/src/api/logistics.js +++ b/seller/src/api/logistics.js @@ -31,4 +31,8 @@ export const updateLogistics = (id,params) => { return putRequest(`/other/logistics/${id}`,params); }; +export const getCheckedOn = params =>{ + return getRequest(`/other/logistics/getCheckedFaceSheet`,params); +} + diff --git a/seller/src/api/order.js b/seller/src/api/order.js index 9c22489e..ff709b67 100644 --- a/seller/src/api/order.js +++ b/seller/src/api/order.js @@ -17,6 +17,10 @@ export const queryExportOrder = params => { return getRequest(`/order/order/queryExportOrder`, params); }; +//获取电子面单 +export const getOrderFaceSheet= (orderSn,params) =>{ + return postRequest(`/order/order/${orderSn}/createElectronicsFaceSheet`,params) +} // 上传待发货的订单列表 export const uploadDeliverExcel = params => { diff --git a/seller/src/api/shops.js b/seller/src/api/shops.js index e23c75e3..f7f4f412 100644 --- a/seller/src/api/shops.js +++ b/seller/src/api/shops.js @@ -48,7 +48,17 @@ export const getIsCheck =(logisticsId) =>{ // 开启物流公司 export const logisticsChecked = (id, params) => { - return postRequest(`/other/logistics/${id}`, params) + return postRequest(`/other/logistics/${id}`, params, { + "Content-type": "application/json" + }) +} +//获取发货地址 +export const getDeliverAddress = () =>{ + return getRequest(`/settings/storeSettings/storeDeliverGoodsAddress`) +} +//修改发货地址 +export const editDeliverAddress = (params) =>{ + return putRequest(`/settings/storeSettings/storeDeliverGoodsAddress`,params) } // 关闭开启物流公司 diff --git a/seller/src/views/goods/goods-seller/goods.vue b/seller/src/views/goods/goods-seller/goods.vue index d9227f3a..f9d819d2 100644 --- a/seller/src/views/goods/goods-seller/goods.vue +++ b/seller/src/views/goods/goods-seller/goods.vue @@ -56,6 +56,7 @@ + + +
+ +
+ +

选择或拖拽文件上传

+
+
+
+
+ +
+
@@ -192,12 +207,16 @@ import { deleteGoods, batchShipTemplate, } from "@/api/goods"; +import { baseUrl } from "@/libs/axios.js"; import * as API_Shop from "@/api/shops"; export default { name: "goods", data() { return { + accessToken: {}, // 验证token + importModal: false, + action: baseUrl + "/goods/import/import", // 上传接口 id: "", //要操作的id loading: true, // 表单加载状态 shipTemplateForm: {}, // 物流模板 @@ -486,6 +505,15 @@ export default { } }); }, + // 上传数据 + handleUpload(file) { + this.file = file; + this.upload(); + return false; + }, + openImportGoods(){ + this.importModal = true + }, // 更新库存 updateStock() { let updateStockList = this.stockList.map((i) => { @@ -727,9 +755,7 @@ export default { }, mounted() { this.init(); - }, - mounted() { - this.init(); + this.accessToken.accessToken = this.getStore("accessToken"); }, }; diff --git a/seller/src/views/order/order/orderDetail.vue b/seller/src/views/order/order/orderDetail.vue index cf7a037c..513c6983 100644 --- a/seller/src/views/order/order/orderDetail.vue +++ b/seller/src/views/order/order/orderDetail.vue @@ -27,6 +27,7 @@ + @@ -439,13 +440,31 @@ 订单发货

+
+ + + +
+ - + + import * as API_Order from "@/api/order"; +import * as API_Logistics from "@/api/logistics"; import liliMap from "@/views/my-components/map/index"; import * as RegExp from "@/libs/RegExp.js"; import region from "@/views/lili-components/region"; @@ -495,6 +516,16 @@ export default { region: [], //地区 regionId: [], //地区id showRegion: false, + someJSONdata: '', + faceSheetForm: { + logisticsId: '', + }, + faceSheetFormValidate: { + logisticsId: [ + { required: true, message: "请选择物流公司"}, + ], + }, + facesheetFlag: false, //电子面单标识 orderLogModal: false, //弹出调整价格框 logisticsModal: false, //弹出查询物流框 orderDeliverModal: false, //订单发货弹出框 @@ -716,6 +747,15 @@ export default { } }); }, + Toprint(){ + this.facesheetFlag = true; + API_Logistics.getCheckedOn().then(res => { + if (res.success) { + this.checkedLogistics = res.result; + this.orderDeliverModal = true; + } + }); + }, // 修改订单金额 modifyPrice() { //默认要修改的金额为订单总金额 @@ -754,6 +794,7 @@ export default { }, //订单发货 orderDeliver() { + this.facesheetFlag = false API_Order.getLogisticsChecked().then((res) => { if (res.success) { this.checkedLogistics = res.result; @@ -761,21 +802,40 @@ export default { } }); }, + Toprints(){ + if(this.form.logisticsId != null && this.form.logisticsId != ''){ + this.orderDeliverModal = false; + this.modalPrint = true; + } + }, //订单发货提交 orderDeliverySubmit() { - this.$refs.orderDeliveryForm.validate((valid) => { - if (valid) { - API_Order.orderDelivery(this.sn, this.orderDeliveryForm).then( - (res) => { + if(this.facesheetFlag){ + this.$refs['faceSheetForm'].validate((valid) => { + if (valid) { + API_Order.getOrderFaceSheet(this.sn, this.faceSheetForm).then(res => { if (res.success) { - this.$Message.success("订单发货成功"); - this.orderDeliverModal = false; - this.getDataDetail(); + this.someJSONdata = res.result; + this.Toprints(); } - } - ); - } - }); + }) + } + }) + }else{ + this.$refs['orderDeliveryForm'].validate((valid) => { + if (valid) { + API_Order.orderDelivery(this.sn,this.orderDeliveryForm).then( + (res) => { + if (res.success) { + this.$Message.success("订单发货成功"); + this.orderDeliverModal = false; + this.getDataDetail(); + } + } + ); + } + }); + } }, //弹出修改收货地址框 editAddress() { @@ -900,7 +960,7 @@ dl dt { .search { - + .div-item { line-height: 35px; diff --git a/seller/src/views/shop/ship/logistics.vue b/seller/src/views/shop/ship/logistics.vue index 682381bb..2807e417 100644 --- a/seller/src/views/shop/ship/logistics.vue +++ b/seller/src/views/shop/ship/logistics.vue @@ -95,7 +95,8 @@ export default { name: "logistics", data() { return { - openModal: true, + row: {}, + openModal: false, loading: true, // 表单加载状态 searchForm: { // 搜索框初始化对象 @@ -246,7 +247,7 @@ export default { }, // 开启 open(v) { - this.modalTitle = v; + this.row = v; this.openModal = true; this.searchForm.faceSheetFlag = "false"; //开弹框 等于v if (this.searchForm.faceSheetFlag == "true") { @@ -257,15 +258,17 @@ export default { }, //修改 getFaceSheetInfo(v) { + this.row = v; this.logisticsId = v.logisticsId; this.openModalTitle = '修改信息'; API_Shop.getIsCheck(this.logisticsId).then((res) => { if (res.success) { // this.searchForm = res.result.recordes; - this.faceSheetForm.faceSheetFlag = String(res.result.faceSheetFlag); //开弹框 等于v - if (this.faceSheetForm.faceSheetFlag == "true") { + this.faceSheetForm.faceSheetFlag = res.result.faceSheetFlag; //开弹框 等于v + if (this.faceSheetForm.faceSheetFlag === true) { this.onpenText = true; } else { + this.faceSheetForm.faceSheetFlag = false this.onpenText = false; } this.faceSheetForm.customerName = res.result.customerName; @@ -275,6 +278,7 @@ export default { this.faceSheetForm.sendStaff = res.result.sendStaff; } }); + this.openModal = true; }, frontDownload(val) { var a = document.createElement("a"); //创建一个标签 @@ -293,10 +297,9 @@ export default { }, submit() { - if (v.selected === null || v.selected === "") { - + if ( this.row.selected === null || this.row.selected === "") { API_Shop.logisticsChecked( - this.modalTitle.logisticsId, + this.row.logisticsId, this.faceSheetForm ).then((res) => { this.openModal = false; diff --git a/seller/src/views/shop/shopSetting.vue b/seller/src/views/shop/shopSetting.vue index 2243601d..7b6db03f 100644 --- a/seller/src/views/shop/shopSetting.vue +++ b/seller/src/views/shop/shopSetting.vue @@ -58,6 +58,77 @@ + +
+ + + + + + + + + + + + + + + + + + + + +
+
{ + if (valid) { + this.addressGoods.salesConsignorAddressPath = this.regionGoods; + this.addressGoods.salesConsignorAddressId = this.regionIdS; + API_Shop.editDeliverAddress(this.addressGoods).then(res=>{ + if(res.success){ + this.$Message.success("修改成功") + } + }) + } + }); }, //获取店铺信息 getShopInfo() { @@ -331,6 +455,18 @@ export default { } }); }, + getDeliverAddress(){ + API_Shop.getDeliverAddress().then(res=>{ + if(res.success){ + if(res.result!= '' && res.result != null){ + console.log(89898999998) + this.addressGoods = res.result; + this.regionGoods = res.result.salesConsignorAddressPath; + this.regionIdS = res.result.salesConsignorAddressId; + } + } + }) + }, //修改售后地址 regionClick() { this.showRegion = true;