From d7255d969024d6317f0f1e01b22452d4c269b922 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 14 Aug 2024 22:59:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8=E5=92=8C=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BC=98=E5=8C=96=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/purchase_product_offer.js | 4 + config/app.js | 2 +- pageQuota/purchase_product_offer/index.vue | 86 ++++++++++++++++------ pages/my/my.vue | 2 +- 4 files changed, 71 insertions(+), 23 deletions(-) diff --git a/api/purchase_product_offer.js b/api/purchase_product_offer.js index 83e8260..2add0e6 100644 --- a/api/purchase_product_offer.js +++ b/api/purchase_product_offer.js @@ -2,4 +2,8 @@ import request from '@/utils/request'; export const purchaseProductOfferLists = (data) => { return request.get('/purchase_product_offer/purchaseproductoffer/lists', data); +} +//报价单提交 +export const purchaseProductOfferUpdate = (data) => { + return request.post('/purchase_product_offer/purchaseproductoffer/offer_update', data); } \ No newline at end of file diff --git a/config/app.js b/config/app.js index 5657b7c..4cc78bc 100644 --- a/config/app.js +++ b/config/app.js @@ -17,7 +17,7 @@ switch (env) { WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' break; case 'local': - BASE_URL = 'http://192.168.1.22:8545'; + BASE_URL = 'http://192.168.1.7:8545'; WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' break; default: diff --git a/pageQuota/purchase_product_offer/index.vue b/pageQuota/purchase_product_offer/index.vue index 30b3c4a..a80be21 100644 --- a/pageQuota/purchase_product_offer/index.vue +++ b/pageQuota/purchase_product_offer/index.vue @@ -1,8 +1,8 @@ @@ -44,7 +70,8 @@ reactive, } from "vue" import { - purchaseProductOfferLists + purchaseProductOfferLists, + purchaseProductOfferUpdate } from "@/api/purchase_product_offer.js" const test2 = () => { @@ -53,13 +80,15 @@ url: '/pages/index/index' }) } - // 状态图片url - const successPng = ref('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/739c3202405071458553459.png') - const errPng = ref('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/04c2c202405071501462462.png') - const waitPng = ref('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/274ad202405111523222891.png') - - - + const show = ref(false) + const formData = ref({ + "id": '', + "store_name": '', + 'product_id': '', + 'nums': '', + 'price': '', + 'total_price':'' + }) // tabsindex const tabIndex = ref(1) const { @@ -79,15 +108,30 @@ const goodsList = ref([]) const goodsList1 = ref([]) - const getGoodsList = async (type) => { - let res = await purchaseProductOfferLists({ - type - }) + const getGoodsList = async () => { + let res = await purchaseProductOfferLists({}) goodsList1.value = res.data.lists } - - - getGoodsList(tabIndex.value) + const cancleOrder = (item) => { + show.value = true + formData.value.store_name = item['store_name'] + formData.value.id = item['id'] + formData.value.nums = item['need_num'] + formData.value.product_id = item['product_id'] + } + const offerUpdate = () => { + purchaseProductOfferUpdate(formData.value).then(res=>{ + uni.$u.toast(res.msg); + show.value=false + getGoodsList() + }) + } + const changeInputPrice=(e)=>{ + if(formData.value.nums>0 && formData.value.price>0){ + formData.value.total_price=formData.value.nums*formData.value.price + } + } + getGoodsList()