耗材管理修改

This commit is contained in:
duan
2024-10-22 14:18:14 +08:00
parent 722ce9c4c3
commit 692ca30253
7 changed files with 67 additions and 24 deletions

View File

@@ -19,7 +19,7 @@
</li>
<li>
<view>
入库数量
<text style="color: red;">*</text> 入库数量
</view>
<view>
<input type="text" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
@@ -27,7 +27,7 @@
</li>
<li>
<view>
单价
<text style="color: red;">*</text>单价
</view>
<view>
<input type="text" placeholder="请输入单价(元)" v-model="datas.form.list.price" name="" id="">
@@ -84,6 +84,8 @@
<!-- <up-button type="text" style="background-color: #f9f9f9;color: #999;" @tap="toggle" :plain="true"
text="取消"></up-button> -->
</view>
<!-- 消息提示 -->
<up-toast ref="uToastRef"></up-toast>
</template>
@@ -92,7 +94,8 @@
ref,
computed,
reactive,
onMounted
onMounted,
getCurrentInstance
} from 'vue';
import color from '@/commons/color.js';
import go from '@/commons/utils/go.js';
@@ -126,8 +129,9 @@
onMounted(() => {
getList()
datas.item = JSON.parse(props.item)
datas.form = assign(datas.form, ...datas.item)
})
const refs = getCurrentInstance()
function toggle() {
go.to('PAGES_ADD_SUPPLIER')
}
@@ -156,7 +160,21 @@
}
function sumbit() {
datas.form.list.conInfoId = props.consId
if (!datas.form.list.stockNumber) {
refs.ctx.$refs.uToastRef.show({
type: 'default',
message: "请输入必填项",
})
return
}
if(!datas.form.list.price){
refs.ctx.$refs.uToastRef.show({
type: 'default',
message: "请输入必填项",
})
return
}
datas.form.list.conInfoId = datas.item.id
datas.form.list = [datas.form.list]
tbConsInfostockInOut({
...datas.form,