耗材解决问题
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
耗材价格
|
||||
</view>
|
||||
<view>
|
||||
<input type="text" placeholder="请输入耗材价格" v-model="datas.form.price" name="" id="">
|
||||
<input placeholder="请输入耗材价格" type="number" v-model="datas.form.price" name="" id="">
|
||||
</view>
|
||||
</li>
|
||||
<li>
|
||||
@@ -59,13 +59,16 @@
|
||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
|
||||
text="保存"></up-button>
|
||||
</view>
|
||||
<!-- 消息提示 -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
computed,
|
||||
onMounted
|
||||
onMounted,
|
||||
getCurrentInstance
|
||||
} from 'vue';
|
||||
import {
|
||||
tbConsTypeList,
|
||||
@@ -107,13 +110,29 @@
|
||||
})
|
||||
})
|
||||
}
|
||||
const refs = getCurrentInstance()
|
||||
let sumbit = () => {
|
||||
if (!datas.form.conUnit) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "单位不能为空"
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!datas.form.price) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "价格不能为空"
|
||||
})
|
||||
return
|
||||
}
|
||||
tbConsInfoAddlist([{
|
||||
...datas.form,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
conTypeId: datas.list[datas.nowStatusIndex].id
|
||||
}]).then(res => {
|
||||
go.to('PAGES_SALES_CONSUMABLES')
|
||||
// go.to('PAGES_SALES_CONSUMABLES')
|
||||
go.back()
|
||||
})
|
||||
}
|
||||
const statusHeight = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user