diff --git a/apis/add-paper.js b/apis/add-paper.js index 142187b..aeced67 100644 --- a/apis/add-paper.js +++ b/apis/add-paper.js @@ -2,31 +2,45 @@ import http from '../utils/http/index.js' // 添加纸品 export function createProduct(data) { - return http.post({ - url: '/base-paper-trading/create/product', - data - }) + return http.post({ + url: '/base-paper-trading/create/product', + data + }) } +// 更新纸品 +export function updateProduct(data) { + return http.post({ + url: '/base-paper-trading/update/product', + data + }) +} + // 纸品种类列表 export function getCategoryList(data) { - return http.get({ - url: '/base-paper-trading/get/product/category-list', - data - }) + return http.get({ + url: '/base-paper-trading/get/product/category-list', + data + }) } // 纸品详情 export function getSupplierDteail(data) { - return http.get({ - url: '/base-paper-trading/get/product-detail/for/supplier', - data - }) + return http.get({ + url: '/base-paper-trading/get/product-detail/for/supplier', + data + }) } // 店铺纸品列表(供应商端) export function SupplierList(data) { - return http.get({ - url: '/base-paper-trading/get/store/product-list/for/supplier', - data - }) + return http.get({ + url: '/base-paper-trading/get/store/product-list/for/supplier', + data + }) } +// 上下架纸品 - +export function productStatus(data) { + return http.post({ + url: '/base-paper-trading/update/product/status', + data + }) +} diff --git a/pages.json b/pages.json index 413c350..d2cf09c 100644 --- a/pages.json +++ b/pages.json @@ -242,7 +242,17 @@ "enablePullDownRefresh": false } } - ], + ,{ + "path" : "pages/platform-message-info/index", + "style" : + { + "navigationBarTitleText": "平台公告详情", + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + + } + ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "uni-app", diff --git a/pages/add-paper/index.vue b/pages/add-paper/index.vue index bf104e6..8b3a5ca 100644 --- a/pages/add-paper/index.vue +++ b/pages/add-paper/index.vue @@ -118,7 +118,6 @@ {{ item.stockUnit === '1' ? '张' : '吨' }} - @@ -192,7 +191,7 @@ @select="select" @delete="deleteImage" > - + @@ -285,7 +284,7 @@ import { back, go2 } from '@/utils/hook.js' import qnEasyinput from '@/components/qn-easyinput/qn-easyinput.vue' import uGap from '@/components/u-gap/u-gap.vue' -import { getCategoryList, createProduct,getSupplierDteail } from '@/apis/add-paper.js' +import { getCategoryList, createProduct, getSupplierDteail, updateProduct } from '@/apis/add-paper.js' const validateFields = ['name', 'isMainProduct', 'manufacturerName', 'brandName', 'categoryId'] const validatePriceFields = ['isPromoting', 'listPrice', 'minimum', 'stock', 'stockUnit', 'weight'] export default { @@ -306,7 +305,6 @@ export default { imageStyles: { width: 100, height: 100, - background:'#000', border: { color: '#f1f1f1', width: 1, @@ -338,15 +336,18 @@ export default { } ], imgList: [], - priceIndex: 0 + priceIndex: 0, + eidtFor: 0 } }, onLoad(option) { if (option) { this.title = option.title } - if(this.title === '编辑纸品'){ + this.eidtFor = 0 + if (this.title === '编辑纸品') { this.getDteailList() + this.eidtFor = 1 } this.getCategoryListQuery() }, @@ -375,13 +376,16 @@ export default { this.$refs.paperpopup.open('bottom') }, //获取详情 - getDteailList(res){ - this.getSupplierDteail(this.form).then(res => { + getDteailList(res) { + var params = { + mallSupplierIds : null, + productId : null + } + this.getSupplierDteail(params).then(res => { if (res) { - this.form = res - this.skuList = res.skuList - this.imgList =res.imgList - + this.form = res + this.skuList = res.skuList + this.imgList = res.imgList } }) }, @@ -450,20 +454,34 @@ export default { } var params = { ...this.form, - skuList:this.skuList, - imgList:this.imgList + skuList: this.skuList, + imgList: this.imgList + } + if (this.eidtFor === 0) { + createProduct(params).then(res => { + if (res) { + uni.showToast({ + title: '添加成功', + icon: 'success' + }) + setTimeout(() => { + back() + }, 1000) + } + }) + } else { + updateProduct(params).then(res => { + if (res) { + uni.showToast({ + title: '更新成功', + icon: 'success' + }) + setTimeout(() => { + back() + }, 1000) + } + }) } - createProduct(this.form).then(res => { - if (res) { - uni.showToast({ - title: '添加成功', - icon: 'success' - }) - setTimeout(() => { - back() - }, 1000) - } - }) }, //获取纸品列表 getCategoryListQuery() { @@ -568,10 +586,10 @@ export default { .paper-price-image { padding: 22rpx 32rpx; } - .paper-upload-image{ + .paper-upload-image { width: 184rpx; height: 184rpx; - background: rgba(220,222,224,0.50); + background: rgba(220, 222, 224, 0.5); border-radius: 10rpx; } .paper-price-textArea { @@ -673,8 +691,8 @@ export default { padding: 10rpx 32rpx; background-color: #ffffff; } - .paper-backColor{ - background-color: rgba(220,222,224,1); + .paper-backColor { + background-color: rgba(220, 222, 224, 1); } } diff --git a/pages/add-record/index.vue b/pages/add-record/index.vue index e561d14..c0cfcde 100644 --- a/pages/add-record/index.vue +++ b/pages/add-record/index.vue @@ -30,7 +30,7 @@ 广州市天河区 - + diff --git a/pages/client-detail/equipment-information.vue b/pages/client-detail/equipment-information.vue index e5ebe41..e1264c7 100644 --- a/pages/client-detail/equipment-information.vue +++ b/pages/client-detail/equipment-information.vue @@ -7,7 +7,8 @@ {{dropdownName}} - + + diff --git a/pages/mall/index.vue b/pages/mall/index.vue index dcf7038..d13e1db 100644 --- a/pages/mall/index.vue +++ b/pages/mall/index.vue @@ -39,7 +39,7 @@ 编辑 - 下架 + {{item.status=== '30111'?'下架':'上架'}} @@ -56,7 +56,7 @@ diff --git a/pages/message/index.vue b/pages/message/index.vue index 28d5883..63d7536 100644 --- a/pages/message/index.vue +++ b/pages/message/index.vue @@ -1,9 +1,101 @@ - + diff --git a/pages/message/platform-message.vue b/pages/message/platform-message.vue new file mode 100644 index 0000000..03f234e --- /dev/null +++ b/pages/message/platform-message.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/pages/message/system-message.vue b/pages/message/system-message.vue new file mode 100644 index 0000000..a79c721 --- /dev/null +++ b/pages/message/system-message.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/pages/paper-detail/index.vue b/pages/paper-detail/index.vue index bc2e2f0..0ba62b4 100644 --- a/pages/paper-detail/index.vue +++ b/pages/paper-detail/index.vue @@ -4,27 +4,118 @@ 纸品详情 - + 分享 + + + 纸品名称: + {{form.name}} + + + 纸厂信息: + 博汇 + + + 品牌信息: + 朱雀 + + + 纸种信息: + 白卡纸 + + + + + 纸品售价 + + + + + 克重 + 规格 + 售价 + 库存 + 是否特价 + + + + 2500g + 779*1092 + 4400.00元 + 8900张 + + + + + + + + 纸品图片 + + + + + + + + + + 商品买点 + 月结30天价格,不加服务费! + + + 商品描述 + 售价全部为含税价,支持先用后付,欢迎来电查询!近期价格波动较大,请下单前先咨询价格。 + + + 送货说明 + 分切纸不足重量的,另加调机费;低于送货重量或超出送货范围的,运费另计。 + + + 其他说明 + 无其他说明。 + diff --git a/pages/platform-message-info/index.vue b/pages/platform-message-info/index.vue new file mode 100644 index 0000000..e715cb2 --- /dev/null +++ b/pages/platform-message-info/index.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/pages/trade/orderList.vue b/pages/trade/orderList.vue index d1ae39b..2341f1f 100644 --- a/pages/trade/orderList.vue +++ b/pages/trade/orderList.vue @@ -1,238 +1,301 @@ - - - - - + this.pagination.pageNum = 1 + switch (value.currentIndex) { + case 0: + this.params.status = 0 + break + case 1: + this.params.status = 30107 + break + case 2: + this.params.status = 30106 + break + case 3: + this.params.status = 30104 + break + + default: + break + } + this.getList() + } + } +} + + + diff --git a/pages/trade/quotationList.vue b/pages/trade/quotationList.vue index 6aafdc2..40c36fe 100644 --- a/pages/trade/quotationList.vue +++ b/pages/trade/quotationList.vue @@ -1,40 +1,45 @@