Browse Source

检验策略百分比符号

master
zhang_li 1 year ago
parent
commit
de1f12b08f
  1. 14
      src/components/rowDrop/index.vue
  2. 20
      src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue

14
src/components/rowDrop/index.vue

@ -2,13 +2,13 @@
<!-- <Dialog title="字段设置" width="270" v-model="popoverVisible" :scroll="true" :maxHeight="500"> -->
<div class="test_wrapper" @dragover="dragover($event)">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handlecheckallchange">全部</el-checkbox>
<el-checkbox-group v-model="checkedDataList" @change="handlecheckedchange">
<draggable :list="allData" :force-fallback="true" chosen-class="chosen" animation="300" @end="dragend" @update="dragenter" >
<template #item="{element}">
<div><el-checkbox :key="element" :label="element">{{element}}</el-checkbox></div>
</template>
</draggable>
</el-checkbox-group>
<el-checkbox-group v-model="checkedDataList" @change="handlecheckedchange">
<draggable :list="allData" :force-fallback="true" chosen-class="chosen" animation="300" @end="dragend" @update="dragenter" >
<template #item="{element}">
<div><el-checkbox :key="element" :label="element">{{element}}</el-checkbox></div>
</template>
</draggable>
</el-checkbox-group>
</div>
<div class="footer">
<!-- <template #footer> -->

20
src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue

@ -97,7 +97,7 @@
<el-form-item label="抽检方式" class="flex-top" v-if="index == 1">
<div class="checkbox">
<el-radio-group v-model="item.Value">
<el-radio :label="cur.value" v-for="cur in getStrDictOptions(DICT_TYPE.SAMPLE_METHOD)"
<el-radio :label="cur.value" v-for="cur in getStrDictOptions(DICT_TYPE.SAMPLE_METHOD)" @change="changeSampleMethod"
:key="cur.value">{{ cur.label }}</el-radio>
</el-radio-group>
</div>
@ -116,9 +116,9 @@
<el-input-number v-model="cur.CeilingQty" :min="cur.FloorQty + 1" class='ml-20px mr-20px' style="width:100px"
controls-position="right" @blur="inputNumberBlur" />
<div>抽样数</div>
<el-input-number v-model="cur.SampleValue" :min="1" class='ml-20px mr-20px' style="width:100px"
<el-input-number v-model="cur.SampleValue" :min="1" :max="formData.configuration[1].Value == 'QTY'?Infinity:100" class='ml-20px mr-20px' style="width:100px"
controls-position="right" @blur="inputNumberBlur" />
<div>EA</div>
<div>{{formData.configuration[1].Value == 'QTY'?'EA':'%'}}</div>
</div>
<div class="button flex">
<div @click="handleAddTable(item.Value)">
@ -248,6 +248,20 @@ const changeSupplierType = (e) => {
}
getFormSupplierList()
//
function changeSampleMethod(e){
console.log(e);
if(e == 'PERCENT'){
console.log(formData.value.configuration[2].Value)
formData.value.configuration[2].Value.forEach(cur=>{
if(cur.SampleValue>100){
cur.SampleValue=100
}
})
}
}
/** 打开弹窗 */
const open = async (type: string, strategyCode: string, id?: number) => {
formStrategyCode.value = strategyCode

Loading…
Cancel
Save