parent
a8d038b011
commit
5d9c009be6
|
@ -3,9 +3,9 @@ let WSS_URL
|
|||
import store from "@/store/user.js"
|
||||
// 环境
|
||||
// let env = "dev"
|
||||
let env = "prod"
|
||||
// let env = "prod"
|
||||
// let env = "release";
|
||||
// let env = "local";
|
||||
let env = "local";
|
||||
|
||||
switch (env) {
|
||||
case 'dev':
|
||||
|
@ -17,7 +17,7 @@ switch (env) {
|
|||
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
||||
break;
|
||||
case 'local':
|
||||
BASE_URL = 'http://192.168.1.7:8545';
|
||||
BASE_URL = 'http://192.168.1.22:8545';
|
||||
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<view>
|
||||
<up-subsection :list="menu_list" :current="0" @change="sectionChange"></up-subsection>
|
||||
<view class="content">
|
||||
<up-transition :show="true" mode="slide-left">
|
||||
<view v-if="goodsList1.length>0">
|
||||
|
@ -14,7 +15,7 @@
|
|||
</view>
|
||||
<view class="card-content-r">
|
||||
<view class="title ellipsis">
|
||||
{{item.store_name}}
|
||||
编号:{{item.order_id}}|{{item.store_name}}
|
||||
</view>
|
||||
<view>
|
||||
单位:{{item.unit_name}}
|
||||
|
@ -22,6 +23,9 @@
|
|||
<view>
|
||||
规格:{{item.store_info}}
|
||||
</view>
|
||||
<view>
|
||||
备注:{{item.mark}}
|
||||
</view>
|
||||
<view style="color: red;">
|
||||
需求量: {{item.need_num}}
|
||||
</view>
|
||||
|
@ -30,10 +34,10 @@
|
|||
</view>
|
||||
|
||||
<view class="card-footer">
|
||||
<up-button size="small" type="primary" shape="circle"
|
||||
@click="cancleOrder(item)" v-if="item.buyer_confirm==0">确认已采购</up-button>
|
||||
<up-button size="small" type="success" shape="circle"
|
||||
v-else disabled >{{item.buyer_confirm_name}}</up-button>
|
||||
<up-button size="small" type="primary" shape="circle" @click="cancleOrder(item)"
|
||||
v-if="item.buyer_confirm==0">确认已采购</up-button>
|
||||
<up-button size="small" type="success" shape="circle" v-else
|
||||
disabled>{{item.buyer_confirm_name}}</up-button>
|
||||
</view>
|
||||
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
|
||||
</view>
|
||||
|
@ -44,19 +48,23 @@
|
|||
<up-modal :show="show" title="采购确认" showCancelButton @cancel="show=false" @confirm="offerUpdate()">
|
||||
<up-form labelPosition="left">
|
||||
<up-form-item label="名称">
|
||||
<up-input v-model="formData.store_name" border="none"></up-input>
|
||||
<up-input v-model="formData.store_name" border="none" disabled=""></up-input>
|
||||
</up-form-item>
|
||||
<up-form-item label="数量">
|
||||
<up-input v-model="formData.nums" border="none" @change='changeInputPrice'></up-input>
|
||||
<up-input v-model="formData.nums" @change='changeInputPrice'></up-input>
|
||||
</up-form-item>
|
||||
<up-form-item label="单价">
|
||||
<up-input v-model="formData.price" border="none" @change='changeInputPrice'></up-input>
|
||||
<up-input v-model="formData.price" @change='changeInputPrice'></up-input>
|
||||
</up-form-item>
|
||||
<up-form-item label="总价">
|
||||
<up-input v-model="formData.total_price" border="none"></up-input>
|
||||
<up-input v-model="formData.total_price"></up-input>
|
||||
</up-form-item>
|
||||
<up-form-item label="出库价">
|
||||
<up-input @click="pickerShow=true"></up-input>
|
||||
</up-form-item>
|
||||
</up-form>
|
||||
</up-modal>
|
||||
<up-picker :show="pickerShow" :columns="columns" keyName="label" @confirm="pickerConfirm"></up-picker>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
@ -72,6 +80,7 @@
|
|||
purchaseProductOfferLists,
|
||||
purchaseProductOfferUpdate
|
||||
} from "@/api/purchase_product_offer.js"
|
||||
const menu_list = ref(['未采购', '已采购']);
|
||||
|
||||
const test2 = () => {
|
||||
console.log("点解")
|
||||
|
@ -80,13 +89,14 @@
|
|||
})
|
||||
}
|
||||
const show = ref(false)
|
||||
const pickerShow=ref(false)
|
||||
const formData = ref({
|
||||
"id": '',
|
||||
"store_name": '',
|
||||
'product_id': '',
|
||||
'nums': '',
|
||||
'price': '',
|
||||
'total_price':''
|
||||
'total_price': ''
|
||||
})
|
||||
// tabsindex
|
||||
const tabIndex = ref(1)
|
||||
|
@ -106,9 +116,11 @@
|
|||
const showGoods1 = ref(false)
|
||||
const goodsList = ref([])
|
||||
const goodsList1 = ref([])
|
||||
|
||||
const where = ref({
|
||||
buyer_confirm: 0
|
||||
})
|
||||
const getGoodsList = async () => {
|
||||
let res = await purchaseProductOfferLists({})
|
||||
let res = await purchaseProductOfferLists(where.value)
|
||||
goodsList1.value = res.data.lists
|
||||
}
|
||||
const cancleOrder = (item) => {
|
||||
|
@ -119,17 +131,38 @@
|
|||
formData.value.product_id = item['product_id']
|
||||
}
|
||||
const offerUpdate = () => {
|
||||
purchaseProductOfferUpdate(formData.value).then(res=>{
|
||||
uni.$u.toast(res.msg);
|
||||
show.value=false
|
||||
getGoodsList()
|
||||
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
|
||||
}
|
||||
}
|
||||
const changeInputPrice = (e) => {
|
||||
if (formData.value.nums > 0 && formData.value.price > 0) {
|
||||
formData.value.total_price = formData.value.nums * formData.value.price
|
||||
}
|
||||
}
|
||||
const sectionChange = (index) => {
|
||||
where.value.buyer_confirm = index
|
||||
getGoodsList()
|
||||
}
|
||||
const columns = reactive([
|
||||
[{
|
||||
label: '雪月夜',
|
||||
// 其他属性值
|
||||
id: 2021
|
||||
// ...
|
||||
},
|
||||
{
|
||||
label: '冷夜雨',
|
||||
id: 804
|
||||
}
|
||||
]
|
||||
]);
|
||||
const pickerConfirm=(e)=>{
|
||||
pickerShow.value=false
|
||||
console.log(e.value[0])
|
||||
}
|
||||
getGoodsList()
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue