Explorar el Código

企业结构人员数 现场考察报告 代理商名称显示问题

baichengfei hace 5 años
padre
commit
d206179993

+ 3 - 4
src/dashoo.cn/frontend_web/src/components/oilsupplier/goodsinfo.vue

@@ -697,8 +697,7 @@
         <el-button style="float: right; padding: 3px 10px"
                    type="text"
                    @click="manufacturerdialog"
-                   v-if="parseInt(formData.Status) <= 0"
-                   :disabled="!certId"
+                   :disabled="certId > 0 && parseInt(formData.status) >= 0"
         >添加</el-button>
       </div>
       <manufacturer-list ref="manufacturerList"
@@ -711,11 +710,11 @@
     <!--打印内容结束-->
     <!--endprint1-->
     <!-- && (formData.InStyle != '2') -->
-    <el-card v-if="isInvestigate">
+    <el-card>
       <el-row>
         <el-col :span="24">
           <span>现场考察报告</span>
-          <el-button v-if="formData.Status <= '0'" :disabled="parseInt(certId) === 0" type="primary" style="margin-left: 10px;" plain size="mini" title="上传" @click="openDialog()" >上传
+          <el-button :disabled="parseInt(certId) === 0" type="primary" style="margin-left: 10px;" plain size="mini" title="上传" @click="openDialog()" >上传
           </el-button>
           <!--<el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"-->
           <!--:http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">-->

+ 28 - 25
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -588,13 +588,19 @@ export default {
     var checkTechnicalNum = (rule, value, callback) => {
       if (value <= 0) {
         callback(new Error('技术、管理人员数量必须大于0'))
+      }
+      if (value >= this.formDataCert.WorkerTotal) {
+        callback(new Error('人员数量不能大于员工总数!'))
       } else {
         callback()
       }
     }
     var checkSkillerTotal = (rule, value, callback) => {
       if (value <= 0) {
-        callback(new Error('技术工人总数必须大于0'))
+        callback(new Error('技术工人总数必1须大于0'))
+      }
+      if (value >= this.formDataCert.WorkerTotal) {
+        callback(new Error('技术工人总数不能大于员工总数!'))
       } else {
         callback()
       }
@@ -1650,30 +1656,27 @@ export default {
             return false
           }
           this.formDataCert.InStyle = this.formData.InStyle
-          api
-            .updateNumberEntity(
-              this.formData.Id + '_' + this.certId,
-              this.formDataCert,
-              this.$axios
-            )
-            .then(res => {
-              if (res.data.code === 0) {
-                // 保存成功后,初始化数据,变成修改
-                this.initDatas()
-                this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
-              } else {
-                this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
-              }
-            })
-            .catch(err => {
-              console.error(err)
-            })
+          api.updateNumberEntity(
+            this.formData.Id + '_' + this.certId,
+            this.formDataCert,
+            this.$axios
+          ).then(res => {
+            if (res.data.code === 0) {
+              // 保存成功后,初始化数据,变成修改
+              this.initDatas()
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          }).catch(err => {
+            console.error(err)
+          })
         } else {
           return false
         }