ソースを参照

前后:已入库检查资质按钮

dubch 4 年 前
コミット
a3e67ff71a

+ 33 - 13
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -2897,7 +2897,7 @@ func (this *OilSupplierController) CheckSupplierFileNew() {
 		filesvc.GetEntityByWhere("OilSupplierFile", where1, &fileist1)
 
 		if !strings.Contains(companyHasHeaders, needHeader.FileName+",") {
-			errinfo.Message = "请上传!" + needHeader.FileName + "!详情请点击检查资质按钮查看!"
+			errinfo.Message = "请上传!" + needHeader.FileName + "! 详情请点击检查资质按钮查看!"
 			errinfo.Code = 0
 			this.Data["json"] = &errinfo
 			this.ServeJSON()
@@ -2910,7 +2910,7 @@ func (this *OilSupplierController) CheckSupplierFileNew() {
 				svc2.GetEntityByWhere("OilAnnualChangeDetail", where2, &filelist2)
 				if filelist2.FileName == "" && fileist1.FileName == "" {
 					//缺少的资质
-					errinfo.Message = "请上传!" + needHeader.FileName + "!详情请点击检查资质按钮查看!"
+					errinfo.Message = "请上传!" + needHeader.FileName + "! 详情请点击检查资质按钮查看!"
 					errinfo.Code = 0
 					this.Data["json"] = &errinfo
 					this.ServeJSON()
@@ -2924,7 +2924,7 @@ func (this *OilSupplierController) CheckSupplierFileNew() {
 				svc2.GetEntityByWhere("OilAppendChangeDetail", where2, &filelist2)
 				if filelist2.FileName == "" && fileist1.FileName == "" {
 					//缺少的资质
-					errinfo.Message = "请上传!" + needHeader.FileName + "!详情请点击检查资质按钮查看!"
+					errinfo.Message = "请上传!" + needHeader.FileName + "! 详情请点击检查资质按钮查看!"
 					errinfo.Code = 0
 					this.Data["json"] = &errinfo
 					this.ServeJSON()
@@ -3199,9 +3199,6 @@ func (this *OilSupplierController) CheckSupplierFileList() {
 			}
 			needList = filesvc.GetGoodsNeedFileListNew(idString, "1")
 			needList1 = filesvc.GetGoodsNeedFileListNew(idString1, "2")
-			for _, need := range needList1 {
-				needList = append(needList, need)
-			}
 		}
 	} else if cert.SupplierTypeCode == "02" {
 		needList = filesvc.GetBasicNeedFileListNew(idString)
@@ -3229,13 +3226,8 @@ func (this *OilSupplierController) CheckSupplierFileList() {
 
 				var certSub []suppliercertsub.OilSupplierCertSub
 				if cert.SupplierTypeCode == "01" {
-					if file.Type == 1 {
-						where2 += " and IsManufacturer != 2"
-						supplierService.GetDeleteSub2(OilGoodsAptitudeName, where2, &certSub, header.Name)
-					} else {
-						where2 += " and IsManufacturer == 2"
-						supplierService.GetDeleteSub2(OilGoodsAptitudeName, where2, &certSub, header.Name)
-					}
+					where2 += " and IsManufacturer != 2"
+					supplierService.GetDeleteSub2(OilGoodsAptitudeName, where2, &certSub, header.Name)
 				} else if cert.SupplierTypeCode == "02" {
 					supplierService.GetDeleteSub2(OilBasisBuildName, where2, &certSub, header.Name)
 				} else {
@@ -3246,6 +3238,34 @@ func (this *OilSupplierController) CheckSupplierFileList() {
 			}
 		}
 	}
+	for _, needHeader := range needList1 {
+		// 非制造
+		if (supplierEntity.CredentialFlag == "1" || supplierEntity.CredentialFlag == "2") &&
+			strings.Contains(mergerCertSkipField, needHeader.FileName+",") {
+			//三证合一或五证合一的证件,不需要验证了
+			continue
+		}
+
+		if !strings.Contains(companyHasHeaders, needHeader.FileName+",") {
+			var header tableheader.BaseTableheader
+			where1 := "Name = '" + needHeader.FileName + "' and CategoryCode = '" + cert.SupplierTypeCode + "'"
+			if cert.SupplierTypeCode == "01" {
+				where1 += " and IsManuf != '1'"
+			}
+			supplierService.GetEntityByWhere(BaseTableHeader, where1, &header)
+			if header.Code != "" {
+				where2 := header.Code + " = '1'"
+				where2 += " and a.SupplierId = " + strconv.Itoa(supplierEntity.Id) + " and a.SupplierTypeCode = '" + cert.SupplierTypeCode + "'"
+				var certSub []suppliercertsub.OilSupplierCertSub
+				if file.Type == 1 {
+					where2 += " and IsManufacturer = 2"
+				}
+				supplierService.GetDeleteSub2(OilGoodsAptitudeName, where2, &certSub, header.Name)
+			} else {
+				fmt.Print("22222")
+			}
+		}
+	}
 
 	var certSubList1 []suppliercertsub.OilSupplierCertSub
 	total := certsubService.GetPagingEntitiesWithOrderBytbl("", file.CurrentPage, file.Size,"Id", true, &certSubList1, "IsQuestion = 2 and SupplierId = " + strconv.Itoa(supplierEntity.Id) + " and SupplierCertId = " + file.CertId)

+ 1 - 4
src/dashoo.cn/frontend_web/src/components/oilsupplier/checkFile.vue

@@ -28,7 +28,7 @@
       </el-card>
 
       <div style="display: flex;justify-content: flex-end;margin-top: 16px;">
-        <el-button type="primary" :loading="deleteLoading" size="mini" @click="deleteList">删除所有</el-button>
+        <el-button type="primary" :loading="deleteLoading" size="mini" @click="deleteData">批量删除</el-button>
       </div>
     </el-dialog>
   </div>
@@ -95,9 +95,6 @@ export default {
           console.error(err)
         })
       }
-    },
-    deleteList () {
-
     },
     fatherMethod () {
       console.log( this.$parent, ' this.$parent')

+ 8 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/basisedit.vue

@@ -16,6 +16,7 @@
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="showApplyTime" v-if="formData.InFlag != '3' && showBtn ">延长有效期</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="reInput" v-if="formData.InFlag == '3'">确认重新准入</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="updateInFlag" v-if="formData.InFlag == '1' || formData.InFlag == '2'">修改准入标识</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" @click="checkFileList">检查资质</el-button>
           <el-button plain icon="el-icon-right" size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button>
           <el-popover>
             <el-steps :active="formData.Step" direction="vertical" align-center finish-status="success">
@@ -274,6 +275,7 @@
     </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
+    <check-file ref="checkFile"></check-file>
   </div>
 </template>
 
@@ -297,6 +299,7 @@
   import BasisInfo from '@/components/oilsupplierstore/basisinfo'
 
   import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  import CheckFile from '@/components/oilsupplier/checkFile'
   import catalogapi from '@/api/oilsupplier/oilcatalog'
 
   export default {
@@ -304,6 +307,7 @@
     components: {
       SupplierFileTable,
       WfHistory,
+      CheckFile,
       WfBackHistory,
       SupplierCertEdit,
 
@@ -525,6 +529,10 @@
       // this.isAccess()
     },
     methods: {
+      checkFileList () {
+        this.$refs.checkFile.checkFileListShow = true
+        this.$refs.checkFile.getValue(this.formData.Id, this.certId, this.formData.OperType === '制造商' ? 1 : 2)
+      },
       updateInFlag () {
         this.dialogInFlag = true
       },

+ 9 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/goodsedit.vue

@@ -16,6 +16,7 @@
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="showApplyTime" v-if="formData.InFlag != '3' && showBtn ">延长有效期</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="reInput" v-if="formData.InFlag == '3'">确认重新准入</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="updateInFlag" v-if="formData.InFlag == '1' || formData.InFlag == '2'">修改准入标识</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" @click="checkFileList">检查资质</el-button>
           <el-button plain icon="el-icon-right" size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button>
           <router-link :to="'/oilsupplier/supplierstore/goodslist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回</el-button>
@@ -190,7 +191,7 @@
 
       </el-tabs>
     </el-card>
-   <el-dialog title="打印内容" :visible.sync="dialogVisible" width="1024px">
+    <el-dialog title="打印内容" :visible.sync="dialogVisible" width="1024px">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>供方基本信息表</span>
@@ -275,6 +276,7 @@
         </span>
       <br>
     </el-dialog>
+    <check-file ref="checkFile"></check-file>
   </div>
 </template>
 
@@ -298,6 +300,7 @@
   import GoodsInfo from '@/components/oilsupplierstore/goodsinfo'
 
   import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  import CheckFile from '@/components/oilsupplier/checkFile'
   import catalogapi from '@/api/oilsupplier/oilcatalog'
 
   export default {
@@ -306,6 +309,7 @@
       chooseAuditorVisible: false,
       SupplierFileTable,
       WfHistory,
+      CheckFile,
       WfBackHistory,
       SupplierCertEdit,
 
@@ -526,6 +530,10 @@
       }
     },
     methods: {
+      checkFileList () {
+        this.$refs.checkFile.checkFileListShow = true
+        this.$refs.checkFile.getValue(this.formData.Id, this.certId, this.formData.OperType === '制造商' ? 1 : 2)
+      },
       editIsRestrict (val) {
         let params = {
           IsRestrict: val

+ 8 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/techedit.vue

@@ -16,6 +16,7 @@
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="showApplyTime" v-if="formData.InFlag != '3' && showBtn ">延长有效期</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="reInput" v-if="formData.InFlag == '3'">确认重新准入</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="updateInFlag" v-if="formData.InFlag == '1' || formData.InFlag == '2'">修改准入标识</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" @click="checkFileList">检查资质</el-button>
           <el-button plain icon="el-icon-right"  size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" v-if="this,formData.Status == '7'" @click="confirm">确认入库</el-button>
           <router-link :to="'/oilsupplier/supplierstore/techlist'">
@@ -277,6 +278,7 @@
     </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
+    <check-file ref="checkFile"></check-file>
 
   </div>
 </template>
@@ -301,6 +303,7 @@
   import TechInfo from '@/components/oilsupplierstore/techinfo'
 
   import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  import CheckFile from '@/components/oilsupplier/checkFile'
   import catalogapi from '@/api/oilsupplier/oilcatalog'
 
   export default {
@@ -308,6 +311,7 @@
     components: {
       SupplierFileTable,
       WfHistory,
+      CheckFile,
       WfBackHistory,
       SupplierCertEdit,
 
@@ -529,6 +533,10 @@
       // this.isAccess()
     },
     methods: {
+      checkFileList () {
+        this.$refs.checkFile.checkFileListShow = true
+        this.$refs.checkFile.getValue(this.formData.Id, this.certId, this.formData.OperType === '制造商' ? 1 : 2)
+      },
       updateInFlag () {
         this.dialogInFlag = true
       },