|
@@ -69,7 +69,7 @@
|
|
|
<p class="label"><span class="mr-10">长度</span></p>
|
|
<p class="label"><span class="mr-10">长度</span></p>
|
|
|
<div>
|
|
<div>
|
|
|
<div v-if="lengthscheme.type == '自定义'">
|
|
<div v-if="lengthscheme.type == '自定义'">
|
|
|
- <a-input-number style="width: 150px;" :controls="false" :step="1" v-model:value="schemeData.length" @blur="onInputChange('length')" placeholder="输入区间内长度"/><span style="color:#666"> 输入范围:{{lengthscheme.min}}mm - {{lengthscheme.max}}mm,不保留小数</span>
|
|
|
|
|
|
|
+ <a-input-number style="width: 150px;" :controls="false" :step="1" v-model:value="schemeData.length" @blur="validCustomSize('length')" placeholder="输入区间内长度"/><span style="color:#666"> 输入范围:{{lengthscheme.min}}mm - {{lengthscheme.max}}mm,不保留小数</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<a-button class="mr-10 mt-10" v-for="(item,index) in lengthscheme.rowsdetail" :key="index" :disabled="schemeData.length != item.num && (schemeData.length != null && schemeData.length != '')" :type="schemeData.length == item.num?'primary':'default'" @click="customClick2('length',item.num)">{{item.num}}</a-button>
|
|
<a-button class="mr-10 mt-10" v-for="(item,index) in lengthscheme.rowsdetail" :key="index" :disabled="schemeData.length != item.num && (schemeData.length != null && schemeData.length != '')" :type="schemeData.length == item.num?'primary':'default'" @click="customClick2('length',item.num)">{{item.num}}</a-button>
|
|
@@ -80,7 +80,7 @@
|
|
|
<p class="label"><span class="mr-10">宽度</span></p>
|
|
<p class="label"><span class="mr-10">宽度</span></p>
|
|
|
<div>
|
|
<div>
|
|
|
<div v-if="widthscheme.type == '自定义'">
|
|
<div v-if="widthscheme.type == '自定义'">
|
|
|
- <a-input-number style="width: 150px;" :controls="false" :step="1" v-model:value="schemeData.width" @blur="onInputChange('width')" placeholder="输入区间内宽度"/><span style="color:#666"> 输入范围:{{widthscheme.min}}mm - {{widthscheme.max}}mm,不保留小数</span>
|
|
|
|
|
|
|
+ <a-input-number style="width: 150px;" :controls="false" :step="1" v-model:value="schemeData.width" @blur="validCustomSize('width')" placeholder="输入区间内宽度"/><span style="color:#666"> 输入范围:{{widthscheme.min}}mm - {{widthscheme.max}}mm,不保留小数</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else>
|
|
<div v-else>
|
|
|
<a-button class="mr-10 mt-10" v-for="(item,index) in widthscheme.rowsdetail" :key="index" :disabled="schemeData.width != item.num && (schemeData.width != null && schemeData.width != '')" :type="schemeData.width == item.num?'primary':'default'" @click="customClick2('width',item.num)">{{item.num}}</a-button>
|
|
<a-button class="mr-10 mt-10" v-for="(item,index) in widthscheme.rowsdetail" :key="index" :disabled="schemeData.width != item.num && (schemeData.width != null && schemeData.width != '')" :type="schemeData.width == item.num?'primary':'default'" @click="customClick2('width',item.num)">{{item.num}}</a-button>
|
|
@@ -296,24 +296,6 @@
|
|
|
schemeInfo.value = res.data
|
|
schemeInfo.value = res.data
|
|
|
return res.data
|
|
return res.data
|
|
|
}
|
|
}
|
|
|
- const onInputChange = ((type)=>{
|
|
|
|
|
- function hasDecimal(num) {
|
|
|
|
|
- const str = num.toString();
|
|
|
|
|
- const decimalIndex = str.indexOf('.');
|
|
|
|
|
- return decimalIndex !== -1;
|
|
|
|
|
- }
|
|
|
|
|
- if (schemeData.value.width && hasDecimal(schemeData.value.width)){
|
|
|
|
|
- message.warning('请输入整数')
|
|
|
|
|
- schemeData.value.width = widthscheme.value.min
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if (schemeData.value.length && hasDecimal(schemeData.value.length)) {
|
|
|
|
|
- message.warning('请输入整数')
|
|
|
|
|
- schemeData.value.length = lengthscheme.value.min
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if (!validCustomSize()) return false
|
|
|
|
|
- })
|
|
|
|
|
const getCustomsizeData = async ()=>{
|
|
const getCustomsizeData = async ()=>{
|
|
|
let lengthschemeid = group.value.item[0].lengthschemeid
|
|
let lengthschemeid = group.value.item[0].lengthschemeid
|
|
|
let widthschemeid = group.value.item[0].widthschemeid
|
|
let widthschemeid = group.value.item[0].widthschemeid
|