Commit 103de35c by lixiaomin

修改页面

parent 0a9a8feb
......@@ -15,7 +15,7 @@
<el-table-column label="原料数量" align="center" prop="quantity">
<template slot-scope="scope">
<div style="display: flex;align-items: center;">
<el-input v-model="scope.row.quantity" placeholder="请输入原料数量" />
<el-input v-model.number="scope.row.quantity" placeholder="请输入原料数量" />
<div style="margin-left: 5px">
<span> {{scope.row.unit}}</span>
</div>
......@@ -101,12 +101,22 @@ export default {
let subTag=true;
this.ids.map((item) => {
if(!item.quantity){
subTag=false;
let name=item.name;
this.$modal.msgSuccess(''+name+"原料名称的原料数量为空");
return;
}else{
// const regular = /^[+]{0,1}(\d+)$/ //正数 (不包括小数)
const regular = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/ //正数(包括小数)
if (!regular.test(item.quantity)) {
this.$modal.msgSuccess(''+item.name+"原料名称的原料数量不是大于0的数字!")
subTag=false;
return;
}
}
});
console.log("subTag",subTag);
if(subTag){
this.$emit(
"callback",
......
......@@ -28,7 +28,11 @@
</el-row>
<el-table v-loading="loading" :data="classList">
<el-table-column label="分类名称" align="center" prop="name" />
<el-table-column label="分类名称" align="center" prop="name">
<template slot-scope="scope">
<a @click="handleUpdate(scope.row)" style="color: blue">{{ scope.row.name }}</a>
</template>
</el-table-column>
<el-table-column label="编码" align="center" prop="code" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="商品数量" align="center" prop="goodsCount" />
......
......@@ -32,7 +32,11 @@
</el-row>
<PutShopOffShop ref="putShopOffShop" @callback="getList" />
<el-table v-loading="loading" :data="spuList" >
<el-table-column label="商品名称" align="center" prop="name" width="150" />
<el-table-column label="商品名称" align="center" prop="name" width="150">
<template slot-scope="scope">
<a @click="handleUpdate(scope.row)" style="color: blue">{{ scope.row.name }}</a>
</template>
</el-table-column>
<el-table-column label="编码" align="center" prop="code" width="150" />
<el-table-column label="缩略图" align="center" prop="" width="150">
<template slot-scope="scope">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment