|
@@ -23,14 +23,13 @@
|
|
|
prop="materialpickUpQuantity"
|
|
|
label-width="100px"
|
|
|
>
|
|
|
- <el-input-number
|
|
|
- v-model="form.materialpickUpQuantity"
|
|
|
- :min="0"
|
|
|
- :precision="2"
|
|
|
- controls-position="right"
|
|
|
- style="width: 200px; margin-left: 30px"
|
|
|
- @input="handleInputMaterialpickUpQuantity"
|
|
|
- />
|
|
|
+ <el-input
|
|
|
+ v-model="form.materialpickUpQuantity"
|
|
|
+ placeholder="0"
|
|
|
+ type="text"
|
|
|
+ style="width: 200px; margin-left: 30px"
|
|
|
+ @input="handleInputMaterialpickUpQuantity"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -41,6 +40,7 @@
|
|
|
v-model="form.peqty"
|
|
|
prop="peqty"
|
|
|
label-width="100px"
|
|
|
+
|
|
|
style="margin-top: 30px"
|
|
|
>
|
|
|
<span style="margin-left: 40px">{{ form.peqty }}</span>
|
|
@@ -62,8 +62,8 @@
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<div class="bottom-buttons">
|
|
|
- <el-button size="large" style="width: 200px;height: 50px;" type="info" @click="cancel">取 消</el-button>
|
|
|
- <el-button size="large" style="width: 200px;height: 50px;" type="primary" @click="handleInputLotNumber"
|
|
|
+ <el-button size="large" style="width: 160px;height: 50px;" type="info" @click="cancel">取 消</el-button>
|
|
|
+ <el-button size="large" style="width: 160px;height: 50px;" type="primary" @click="handleInputLotNumber"
|
|
|
>填入</el-button
|
|
|
>
|
|
|
</div>
|
|
@@ -93,13 +93,15 @@ const detailInfo = ref({})
|
|
|
function open(data) {
|
|
|
reset();
|
|
|
detailInfo.value = proxy.deepClone(data);
|
|
|
- getProductionLotAmount({lotno:detailInfo.value.productionPlanNo,lotseq:detailInfo.value.lineNumber}).then(res =>{
|
|
|
- if(res.code == 200) {
|
|
|
- form.value.peqty = res.data[0].peqty
|
|
|
- visible.value = true;
|
|
|
- }
|
|
|
- }
|
|
|
-)
|
|
|
+ form.value.peqty = 22.8
|
|
|
+ visible.value =true
|
|
|
+// getProductionLotAmount({lotno:detailInfo.value.productionPlanNo,lotseq:detailInfo.value.lineNumber}).then(res =>{
|
|
|
+// if(res.code == 200) {
|
|
|
+// form.value.peqty = res.data[0].peqty
|
|
|
+// visible.value = true;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// )
|
|
|
|
|
|
}
|
|
|
|
|
@@ -113,14 +115,29 @@ function cancel() {
|
|
|
function reset() {
|
|
|
form.value = {
|
|
|
lotNumber: 0,
|
|
|
- materialpickUpQuantity:0
|
|
|
+ materialpickUpQuantity:''
|
|
|
};
|
|
|
proxy.resetForm("formRef");
|
|
|
}
|
|
|
//填写领料量
|
|
|
function handleInputMaterialpickUpQuantity(data) {
|
|
|
- form.value.lotNumber = Math.ceil(data / form.value.peqty);
|
|
|
-}
|
|
|
+ // if (data < 0) {
|
|
|
+ // form.value.materialpickUpQuantity = 0;
|
|
|
+ // }else{
|
|
|
+ // form.value.lotNumber = Math.ceil(data / form.value.peqty);
|
|
|
+ // }
|
|
|
+ const regex =/^(?!0+(?:\.0+)?$)[1-9]\d*(\.\d*)?$/;
|
|
|
+ // 检查输入值是否符合正则表达式规则
|
|
|
+ if (!regex.test(data)) {
|
|
|
+ // 如果不符合规则,清空输入或设置为0
|
|
|
+ form.value.materialpickUpQuantity = '';
|
|
|
+ } else {
|
|
|
+ // 如果符合规则,更新模型
|
|
|
+ form.value.materialpickUpQuantity = data;
|
|
|
+ form.value.lotNumber = Math.ceil(data / form.value.peqty);
|
|
|
+ }
|
|
|
+
|
|
|
+ };
|
|
|
|
|
|
// 投产批数带回
|
|
|
function handleInputLotNumber(){
|