测试问题修改
This commit is contained in:
		
							parent
							
								
									04d5cb11ef
								
							
						
					
					
						commit
						0f449ae06f
					
				| 
						 | 
				
			
			@ -175,6 +175,7 @@
 | 
			
		|||
                          accept=".png, .jpg, .jpeg"
 | 
			
		||||
                          :on-success="handleAvatarSuccess"
 | 
			
		||||
                          :class="{ disabled: uploadDisabled }"
 | 
			
		||||
                          :before-upload="handleBeforeUpload"
 | 
			
		||||
                          :on-preview="handlePictureCardPreview"
 | 
			
		||||
                          :on-remove="handleRemove"
 | 
			
		||||
                      >
 | 
			
		||||
| 
						 | 
				
			
			@ -440,6 +441,14 @@
 | 
			
		|||
                this.$modal.msgError(error)
 | 
			
		||||
            })
 | 
			
		||||
        },
 | 
			
		||||
        // 上传之前
 | 
			
		||||
        handleBeforeUpload(file) { 
 | 
			
		||||
            const isLt = file.size / 1024 / 1024 < 5
 | 
			
		||||
            if (!isLt) {
 | 
			
		||||
                this.$modal.msgError(`图片大小不能超过 5 MB`)
 | 
			
		||||
                return false
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        handleAvatarSuccess(res, file) {
 | 
			
		||||
            console.log('success')
 | 
			
		||||
        },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -200,6 +200,7 @@
 | 
			
		|||
                        list-type="picture-card"
 | 
			
		||||
                        accept=".png, .jpg, .jpeg"
 | 
			
		||||
                        :on-success="handleAvatarSuccess"
 | 
			
		||||
                        :before-upload="handleBeforeUpload"
 | 
			
		||||
                        :class="{ disabled: uploadDisabled }"
 | 
			
		||||
                        :on-preview="handlePictureCardPreview"
 | 
			
		||||
                        :on-remove="handleRemove"
 | 
			
		||||
| 
						 | 
				
			
			@ -724,6 +725,14 @@ export default {
 | 
			
		|||
      handleExceed(files, fileList) {
 | 
			
		||||
          this.$message.warning('最多只可以上传一张图片')
 | 
			
		||||
      },
 | 
			
		||||
      // 上传之前
 | 
			
		||||
      handleBeforeUpload(file) { 
 | 
			
		||||
          const isLt = file.size / 1024 / 1024 < 5
 | 
			
		||||
          if (!isLt) {
 | 
			
		||||
              this.$modal.msgError(`图片大小不能超过 5 MB`)
 | 
			
		||||
              return false
 | 
			
		||||
          }
 | 
			
		||||
      },
 | 
			
		||||
      handleRemove(file, fileList) {
 | 
			
		||||
          let sum = 0
 | 
			
		||||
          this.checkUrlNameList.forEach((item, index) => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -366,7 +366,7 @@
 | 
			
		|||
                  <el-form-item label="菜品价格" prop="price" v-if="baseForm.sizeType==1">
 | 
			
		||||
                    <el-input
 | 
			
		||||
                      v-model="baseForm.price"
 | 
			
		||||
                      placeholder="请输入菜品价格" maxlength="10"
 | 
			
		||||
                      placeholder="请输入菜品价格" maxlength="9"
 | 
			
		||||
                      @input="handleNumericInput('price', $event)"
 | 
			
		||||
                      @blur="formatNumericValue('price')"
 | 
			
		||||
                    >
 | 
			
		||||
| 
						 | 
				
			
			@ -377,7 +377,7 @@
 | 
			
		|||
                <el-col :span="12">
 | 
			
		||||
                  <el-form-item label="成本价" prop="materialCost" v-if="baseForm.sizeType==1">
 | 
			
		||||
                    <el-input
 | 
			
		||||
                      v-model="baseForm.materialCost" maxlength="10"
 | 
			
		||||
                      v-model="baseForm.materialCost" maxlength="9"
 | 
			
		||||
                      placeholder="请输入成本价" disabled
 | 
			
		||||
                      @input="handleNumericInput('materialCost', $event)"
 | 
			
		||||
                      @blur="formatNumericValue('materialCost')"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -182,22 +182,22 @@
 | 
			
		|||
                        </el-table-column>
 | 
			
		||||
                        <el-table-column label="当餐售价" align="center" prop="price">
 | 
			
		||||
                            <template slot-scope="scope">
 | 
			
		||||
                                <el-input  v-model="scope.row.price" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.price=v.replace(/[^\d.]/g,''))"/>
 | 
			
		||||
                                <el-input  v-model="scope.row.price" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.price=v.replace(/[^\d.]/g,''))"/>
 | 
			
		||||
                            </template>
 | 
			
		||||
                        </el-table-column>
 | 
			
		||||
                        <el-table-column label="当餐优惠价" align="center" prop="salePrice">
 | 
			
		||||
                            <template slot-scope="scope">
 | 
			
		||||
                                <el-input  v-model="scope.row.salePrice" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.salePrice=v.replace(/[^\d.]/g,''))"/>
 | 
			
		||||
                                <el-input  v-model="scope.row.salePrice" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.salePrice=v.replace(/[^\d.]/g,''))"/>
 | 
			
		||||
                            </template>
 | 
			
		||||
                        </el-table-column>
 | 
			
		||||
                        <el-table-column label="最大供应量" align="center" prop="supplyNum">
 | 
			
		||||
                            <template slot-scope="scope">
 | 
			
		||||
                                <el-input  v-model="scope.row.supplyNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.supplyNum=v.replace(/[^\d]/g,''))"/>
 | 
			
		||||
                                <el-input  v-model="scope.row.supplyNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.supplyNum=v.replace(/[^\d]/g,''))"/>
 | 
			
		||||
                            </template>
 | 
			
		||||
                        </el-table-column>
 | 
			
		||||
                        <el-table-column label="每人限购数" align="center" prop="limitNum">
 | 
			
		||||
                            <template slot-scope="scope">
 | 
			
		||||
                                <el-input  v-model="scope.row.limitNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.limitNum=v.replace(/[^\d]/g,''))"/>
 | 
			
		||||
                                <el-input  v-model="scope.row.limitNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.limitNum=v.replace(/[^\d]/g,''))"/>
 | 
			
		||||
                            </template>
 | 
			
		||||
                        </el-table-column>
 | 
			
		||||
                        <el-table-column label="移动端推荐" align="center" prop="recommendFlag">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -182,22 +182,22 @@
 | 
			
		|||
                        </el-table-column>
 | 
			
		||||
                        <el-table-column label="当餐售价" align="center" prop="price">
 | 
			
		||||
                            <template slot-scope="scope">
 | 
			
		||||
                                <el-input  v-model="scope.row.price" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.price=v.replace(/[^\d.]/g,''))"/>
 | 
			
		||||
                                <el-input  v-model="scope.row.price" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.price=v.replace(/[^\d.]/g,''))"/>
 | 
			
		||||
                            </template>
 | 
			
		||||
                        </el-table-column>
 | 
			
		||||
                        <el-table-column label="当餐优惠价" align="center" prop="salePrice">
 | 
			
		||||
                            <template slot-scope="scope">
 | 
			
		||||
                                <el-input  v-model="scope.row.salePrice" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.salePrice=v.replace(/[^\d.]/g,''))"/>
 | 
			
		||||
                                <el-input  v-model="scope.row.salePrice" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.salePrice=v.replace(/[^\d.]/g,''))"/>
 | 
			
		||||
                            </template>
 | 
			
		||||
                        </el-table-column>
 | 
			
		||||
                        <el-table-column label="最大供应量" align="center" prop="supplyNum">
 | 
			
		||||
                            <template slot-scope="scope">
 | 
			
		||||
                                <el-input  v-model="scope.row.supplyNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.supplyNum=v.replace(/[^\d]/g,''))"/>
 | 
			
		||||
                                <el-input  v-model="scope.row.supplyNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.supplyNum=v.replace(/[^\d]/g,''))"/>
 | 
			
		||||
                            </template>
 | 
			
		||||
                        </el-table-column>
 | 
			
		||||
                        <el-table-column label="每人限购数" align="center" prop="limitNum">
 | 
			
		||||
                            <template slot-scope="scope">
 | 
			
		||||
                                <el-input  v-model="scope.row.limitNum" placeholder="请输入" maxlength="30" clearable @input="(v)=>(scope.row.limitNum=v.replace(/[^\d]/g,''))"/>
 | 
			
		||||
                                <el-input  v-model="scope.row.limitNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.limitNum=v.replace(/[^\d]/g,''))"/>
 | 
			
		||||
                            </template>
 | 
			
		||||
                        </el-table-column>
 | 
			
		||||
                        <el-table-column label="移动端推荐" align="center" prop="recommendFlag">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -552,7 +552,7 @@
 | 
			
		|||
                canteenId:row.canteenId,
 | 
			
		||||
                stallId:row.stallId,
 | 
			
		||||
            }
 | 
			
		||||
            this.$router.push({ path: "/device/doubleScreen",query: obj });
 | 
			
		||||
            this.$router.push({ path: "/canteen/device/canteenDevices",query: obj });
 | 
			
		||||
        },
 | 
			
		||||
        /** 删除按钮操作 */
 | 
			
		||||
        handleDelete(row) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -80,7 +80,7 @@
 | 
			
		|||
              <el-form-item label="商品进价" prop="unitPrice">
 | 
			
		||||
                <el-input
 | 
			
		||||
                  v-model="form.unitPrice"
 | 
			
		||||
                  placeholder="请输入商品进价"
 | 
			
		||||
                  placeholder="请输入商品进价" maxlength="8"
 | 
			
		||||
                  @input="handleNumericInput('unitPrice', $event)"
 | 
			
		||||
                  @blur="formatNumericValue('unitPrice')"
 | 
			
		||||
                >
 | 
			
		||||
| 
						 | 
				
			
			@ -93,7 +93,7 @@
 | 
			
		|||
                <el-input
 | 
			
		||||
                  v-model="form.salePrice"
 | 
			
		||||
                  placeholder="请输入零售价"
 | 
			
		||||
                  maxlength="20"
 | 
			
		||||
                  maxlength="8"
 | 
			
		||||
                  @input="handleNumericInput('salePrice', $event)"
 | 
			
		||||
                  @blur="formatNumericValue('salePrice')"
 | 
			
		||||
                />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -976,7 +976,6 @@
 | 
			
		|||
                "ifRelateDrp": 2,
 | 
			
		||||
                "imgUrl": "",
 | 
			
		||||
            } 
 | 
			
		||||
            this.baseForm = {};
 | 
			
		||||
            this.resetForm("baseForm");
 | 
			
		||||
        },
 | 
			
		||||
        /** 修改按钮操作 */
 | 
			
		||||
| 
						 | 
				
			
			@ -1172,10 +1171,10 @@
 | 
			
		|||
        // 节点单击事件 - 左侧树
 | 
			
		||||
        async handleNodeClick(data, node) {
 | 
			
		||||
          console.log(data)
 | 
			
		||||
          // this.handleQuery();
 | 
			
		||||
          // this.handleShopQuery();
 | 
			
		||||
        },
 | 
			
		||||
        handleCheckChange(data, checked, indeterminate) {
 | 
			
		||||
          this.handleQuery();
 | 
			
		||||
          this.handleShopQuery();
 | 
			
		||||
        },
 | 
			
		||||
        /* 树节点增加 */
 | 
			
		||||
        appendTreeNode(data) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1369,7 +1368,7 @@
 | 
			
		|||
 | 
			
		||||
        /** 商品新增 */
 | 
			
		||||
        handleShopAdd() {
 | 
			
		||||
            this.reset();
 | 
			
		||||
            // this.reset();
 | 
			
		||||
            this.openAddProduct = true;
 | 
			
		||||
            this.titleAddProduct = "新增-超市商品";
 | 
			
		||||
            this.getAddShopList();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -620,6 +620,7 @@
 | 
			
		|||
                            list-type="picture-card"
 | 
			
		||||
                            accept=".png, .jpg, .jpeg"
 | 
			
		||||
                            :on-success="handleAvatarSuccess"
 | 
			
		||||
                            :before-upload="handleBeforeUpload"
 | 
			
		||||
                            :class="{ disabled: uploadDisabled }"
 | 
			
		||||
                            :on-preview="handlePictureCardPreview"
 | 
			
		||||
                            :on-remove="handleRemove"
 | 
			
		||||
| 
						 | 
				
			
			@ -1421,6 +1422,14 @@ export default {
 | 
			
		|||
        handleAvatarSuccess(res, file) {
 | 
			
		||||
            console.log('success')
 | 
			
		||||
        },
 | 
			
		||||
        // 上传之前
 | 
			
		||||
        handleBeforeUpload(file) { 
 | 
			
		||||
            const isLt = file.size / 1024 / 1024 < 5
 | 
			
		||||
            if (!isLt) {
 | 
			
		||||
                this.$modal.msgError(`图片大小不能超过 5 MB`)
 | 
			
		||||
                return false
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        handleExceed(files, fileList) {
 | 
			
		||||
            this.$message.warning('最多只可以上传一张图片')
 | 
			
		||||
        },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue