修改耗材问题

This commit is contained in:
duan 2024-11-01 16:36:14 +08:00
parent 5e4022f85c
commit dc1ff9ba43
4 changed files with 38 additions and 28 deletions

View File

@ -41,6 +41,7 @@ export function queryAllShopInfo(params) {
method: "get", method: "get",
params: { params: {
shopId: uni.getStorageSync('shopId'), shopId: uni.getStorageSync('shopId'),
isVip:1,
...params ...params
} }
}); });

View File

@ -63,8 +63,9 @@
}, },
}) })
const currentInstance = getCurrentInstance() const currentInstance = getCurrentInstance()
function sumbit() { function sumbit() {
if(!datas.form.purveyorName||!datas.form.purveyorTelephone||!datas.form.address){ if (!datas.form.purveyorName || !datas.form.purveyorTelephone || !datas.form.address) {
currentInstance.ctx.$refs.uToastRef.show({ currentInstance.ctx.$refs.uToastRef.show({
message: "请填写必填项", message: "请填写必填项",
type: 'default', type: 'default',
@ -72,7 +73,16 @@
return return
} }
tbShopPurveyorpost(datas.form).then(res => { tbShopPurveyorpost(datas.form).then(res => {
go.back() currentInstance.ctx.$refs.uToastRef.show({
message: "添加成功",
type: 'default',
})
setTimeout(() => {
// go.to('PAGES_SUPPLIER')pageConsumables/supplier
// uni.redirectTo({url: '/pageConsumables/supplier'})
go.back()
// uni.redirectTo({url: '/pageConsumables/supplier'})
}, 1000)
}) })
} }
</script> </script>
@ -140,6 +150,7 @@
.bottombutton { .bottombutton {
margin-top: 84rpx; margin-top: 84rpx;
padding: 0 24rpx; padding: 0 24rpx;
>button { >button {
width: 530rpx; width: 530rpx;
height: 80rpx; height: 80rpx;

View File

@ -57,27 +57,29 @@
<input type="text" placeholder="请输入总价值(元)" name="" id=""> <input type="text" placeholder="请输入总价值(元)" name="" id="">
</view> </view>
</li> --> </li> -->
<view style="justify-content: space-between;"> <view style="justify-content: space-between;align-items: center;">
<view> <view>
供应商 供应商
</view> </view>
<view style="width: 54%;" @tap="showStatusToggle"> <picker @change="changeNowStatusIndex" :value="nowStatusIndex" :range="datas.status">
{{datas.status[nowStatusIndex]}} <view class="color-333" style="height: 84rpx;line-height: 84rpx;">{{datas.status[nowStatusIndex]}}</view>
</view> </picker>
<uni-icons type="bottom" size="16"></uni-icons> <uni-icons type="bottom" size="16"></uni-icons>
<view style="color: #318AFE;width: 80rpx;text-align: center;" @tap="toggle"> <view style="color: #318AFE;width: 80rpx;text-align: center;" @tap="toggle">
新增 新增
</view> </view>
<!-- <up-button type="text" style="color: #318AFE;" @tap="toggle" :plain="true"
text="新增"></up-button> -->
</view> </view>
</view> </view>
<view :style="{height:showStatus?statusHeight:0}" class="tranistion status overflow-hide"> <!-- <view :style="{height:showStatus?statusHeight:0}" class="tranistion status overflow-hide">
<view @tap="changeNowStatusIndex(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between" <view @tap="changeNowStatusIndex(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
v-for="(item,index) in datas.status" :key="index"> v-for="(item,index) in datas.status" :key="index">
<view :class="{'color-main':nowStatusIndex===index}">{{item}}</view> <view :class="{'color-main':nowStatusIndex===index}">{{item}}</view>
<uni-icons v-if="nowStatusIndex===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons> <uni-icons v-if="nowStatusIndex===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons>
</view> </view>
<view :style="{height: '14px'}"></view> <view :style="{height: '14px'}"></view>
</view> </view> -->
</view> </view>
<view class="bottombutton"> <view class="bottombutton">
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true" <up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
@ -156,7 +158,7 @@
let nowStatusIndex = ref(0) let nowStatusIndex = ref(0)
function changeNowStatusIndex(i) { function changeNowStatusIndex(i) {
nowStatusIndex.value = i nowStatusIndex.value = i.detail.value
showStatus.value = false showStatus.value = false
} }

View File

@ -25,7 +25,7 @@
<input type="number" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id=""> <input type="number" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
</view> </view>
</view> </view>
<!-- <view style="justify-content: space-between;"> <!-- <view style="justify-content: space-between;">
<view> <view>
单位 单位
</view> </view>
@ -66,33 +66,28 @@
<input type="text" placeholder="请输入总价值(元)" name="" id=""> <input type="text" placeholder="请输入总价值(元)" name="" id="">
</view> </view>
</view> --> </view> -->
<view style="justify-content: space-between;"> <view style="justify-content: space-between;align-items: center;">
<view> <view>
供应商 供应商
</view> </view>
<view style="width: 375rpx;" @tap="showStatusToggle"> <picker @change="changeNowStatusIndex" :value="nowStatusIndex" :range="datas.status">
{{datas.status[nowStatusIndex]}} <view class="color-333" style="height: 84rpx;line-height: 84rpx;">{{datas.status[nowStatusIndex]}}</view>
</view> </picker>
<uni-icons type="bottom" size="16"></uni-icons> <uni-icons type="bottom" size="16"></uni-icons>
<view style="color: #318AFE;width: 80rpx;text-align: center;" @tap="toggle"> <view style="color: #318AFE;width: 80rpx;text-align: center;" @tap="toggle">
新增 新增
</view> </view>
<!-- <up-button type="text" style="color: #318AFE;" @tap="toggle" :plain="true" <!-- <up-button type="text" style="color: #318AFE;" @tap="toggle" :plain="true"
text="新增"></up-button> --> text="新增"></up-button> -->
</view> </view>
</view> </view>
<view :style="{height:showStatus?statusHeight:0}" class="tranistion status overflow-hide">
<view @tap="changeNowStatusIndex(index)" class="u-flex u-p-l-30 lh30 u-p-r-30 u-row-between"
v-for="(item,index) in datas.status" :key="index">
<view :class="{'color-main':nowStatusIndex===index}">{{item}}</view>
<uni-icons v-if="nowStatusIndex===index" type="checkmarkempty" :color="color.ColorMain"></uni-icons>
</view>
<view :style="{height: '14px'}"></view>
</view>
</view> </view>
<view class="bottombutton"> <view class="bottombutton">
<up-button type="primary" style="background-color: #318AFE;color: #fff;width: 100%!important;" @tap="sumbit" :plain="true" <up-button type="primary" style="background-color: #318AFE;color: #fff;width: 100%!important;" @tap="sumbit"
text="保存"></up-button> :plain="true" text="保存"></up-button>
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true" <!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
text="取消"></up-button> --> text="取消"></up-button> -->
</view> </view>
@ -159,6 +154,7 @@
res.content.forEach(ele => { res.content.forEach(ele => {
datas.status.push(ele.purveyorName) datas.status.push(ele.purveyorName)
}) })
console.log(datas.status, '调试121')
}) })
} }
@ -168,7 +164,7 @@
let nowStatusIndex = ref(0) let nowStatusIndex = ref(0)
function changeNowStatusIndex(i) { function changeNowStatusIndex(i) {
nowStatusIndex.value = i nowStatusIndex.value = i.detail.value
showStatus.value = false showStatus.value = false
} }
@ -187,7 +183,7 @@
}) })
return return
} }
if(!datas.list[nowStatusIndex.value]){ if (!datas.list[nowStatusIndex.value]) {
refs.ctx.$refs.uToastRef.show({ refs.ctx.$refs.uToastRef.show({
type: 'default', type: 'default',
message: "供应商不能为空", message: "供应商不能为空",