取号换行

This commit is contained in:
duan 2024-11-06 11:01:46 +08:00
parent a4d36b3fa8
commit d885fb521d
3 changed files with 46 additions and 16 deletions

View File

@ -33,6 +33,18 @@
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
</view>
</view>
<view style="justify-content: space-between;">
<view>
单位
</view>
<picker @change="changeNowStatusIndexs" :range="datas.unitList">
<view class="color-333" style="height: 84rpx;line-height: 84rpx;">
{{datas.form.list.unit}}
</view>
</picker>
<!-- defaultUnit -->
<uni-icons type="bottom" size="16"></uni-icons>
</view>
<view>
<view>
应付金额
@ -117,6 +129,7 @@
list: [],
//
status: [],
unitList:[],
form: {
shopId: uni.getStorageSync("shopId"),
type: "out",
@ -135,6 +148,10 @@
})
onMounted(() => {
datas.item = JSON.parse(props.item)
datas.form = Object.assign(datas.form, datas.item)
//
datas.unitList = [ datas.form.conUnit,datas.form.conUnitTwo]
datas.form.list.unit=datas.form.defaultUnit
})
onShow(() => {
getList()
@ -165,7 +182,9 @@ onShow(() => {
nowStatusIndex.value = i.detail.value
showStatus.value = false
}
function changeNowStatusIndexs(i) {
datas.form.list.unit = datas.unitList[i.detail.value]
}
function sumbit() {
if (!datas.form.list.stockNumber) {

View File

@ -25,15 +25,6 @@
<input type="number" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
</view>
</view>
<!-- <view style="justify-content: space-between;">
<view>
单位
</view>
<view style="width: 54%;" @tap="showStatusToggle">
{{datas.status[nowStatusIndex]}}
</view>
<uni-icons type="bottom" size="16"></uni-icons>
</view> -->
<view>
<view>
<text style="color: red;">*</text>单价
@ -42,6 +33,18 @@
<input type="number" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
</view>
</view>
<view style="justify-content: space-between;">
<view>
单位
</view>
<picker @change="changeNowStatusIndexs" :range="datas.unitList">
<view class="color-333" style="height: 84rpx;line-height: 84rpx;">
{{datas.form.list.unit}}
</view>
</picker>
<!-- defaultUnit -->
<uni-icons type="bottom" size="16"></uni-icons>
</view>
<view>
<view>
应付金额
@ -71,14 +74,13 @@
供应商
</view>
<picker @change="changeNowStatusIndex" :value="nowStatusIndex" :range="datas.status">
<view class="color-333" style="height: 84rpx;line-height: 84rpx;">{{datas.status[nowStatusIndex]}}</view>
<view class="color-333" style="height: 84rpx;line-height: 84rpx;">{{datas.status[nowStatusIndex]}}
</view>
</picker>
<uni-icons type="bottom" size="16"></uni-icons>
<view style="color: #318AFE;width: 80rpx;text-align: center;" @tap="toggle">
新增
</view>
<!-- <up-button type="text" style="color: #318AFE;" @tap="toggle" :plain="true"
text="新增"></up-button> -->
</view>
</view>
@ -120,6 +122,8 @@
list: [],
//
status: [],
//
unitList: [],
form: {
shopId: uni.getStorageSync("shopId"),
type: "in",
@ -138,7 +142,10 @@
})
onMounted(() => {
datas.item = JSON.parse(props.item)
datas.form = assign(datas.form, ...datas.item)
datas.form = Object.assign(datas.form, datas.item)
//
datas.unitList = [ datas.form.conUnit,datas.form.conUnitTwo]
datas.form.list.unit=datas.form.defaultUnit
})
onShow(() => {
getList()
@ -159,7 +166,6 @@
res.content.forEach(ele => {
datas.status.push(ele.purveyorName)
})
console.log(datas.status, '调试121')
})
}
@ -173,6 +179,10 @@
showStatus.value = false
}
function changeNowStatusIndexs(i) {
datas.form.list.unit = datas.unitList[i.detail.value]
}
function sumbit() {
if (!datas.form.list.stockNumber) {
refs.ctx.$refs.uToastRef.show({

View File

@ -267,6 +267,7 @@
.pageLineUpTop {
.df;
justify-content: space-around;
flex-wrap: wrap;
margin: 36rpx 0;
>view {
@ -275,7 +276,7 @@
background: #FFFFFF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 2rpx solid #E5E5E5;
margin-top: 20rpx;
>view {
text-align: center;
}