Explorar el Código

前后:已入库,增项检查资质

dubch hace 4 años
padre
commit
baed22f354

+ 10 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertsub.go

@@ -984,8 +984,9 @@ func (this *OilSupplierCertSubController) AddBusiness() {
 func (this *OilSupplierCertSubController) BusinessDelete() {
 	Id := this.Ctx.Input.Param(":Id")
 	//SupplierCertId := this.GetString("SupplierCertId")
+	SupplierId := this.GetString("SupplierId")
 	var errinfo ErrorInfo
-	if Id == "" {
+	if Id == "" || SupplierId == "" {
 		errinfo.Message = "操作失败!请求信息不完整"
 		errinfo.Code = -2
 		this.Data["json"] = &errinfo
@@ -995,10 +996,16 @@ func (this *OilSupplierCertSubController) BusinessDelete() {
 
 	//根据Id查出OilSupplierCertSub的SubClassId
 	svc := suppliercertsub.GetOilSupplierCertSubService(utils.DBE)                 //获得数据库引擎
-	where := "delete from " + OilSupplierCertSubName + " where Id in (" + Id + ")" // 没有删除的准入范围
+	var certSub []suppliercertsub.OilSupplierCertSub
+	svc.GetEntitysByWhere(OilSupplierCertSubName, "SupplierId = " + SupplierId + " and Id in (" + Id + ")", &certSub)
+	where := "delete from " + OilSupplierCertSubName + " where SupplierId = " + SupplierId + " and Id in (" + Id + ")" // 没有删除的准入范围
 	svc.DBE.Exec(where)
 
-	// TODO: 删除准入范围和资质对应关系表
+	for _, sub := range certSub {
+		svc.InsertEntityBytbl(TmpOilSupplierCertSubName, &sub)
+	}
+
+		// TODO: 删除准入范围和资质对应关系表
 	/*whereCert2File := "delete from " + OilSupplierCert2FileName + " where SupplierCertSubId in (" + Id + ")" // 没有删除的准入范围
 	svc.DBE.Exec(whereCert2File)*/
 

+ 13 - 6
src/dashoo.cn/frontend_web/src/components/oilsupplier/checkFile.vue

@@ -2,6 +2,11 @@
   <div>
     <el-dialog title="缺资质准入范围" :visible.sync="checkFileListShow" :close-on-click-modal="false" width="80%">
       <el-card class="box-card" style="height: calc(100vh - 115px);">
+        <div slot="header">
+          <span style="float: right; margin-top: -10px">
+            <el-button type="primary" :loading="deleteLoading" size="mini" @click="deleteData('')">批量删除</el-button>
+          </span>
+        </div>
         <el-table :data="subList" border height="calc(100vh - 243px)" size="mini" style="width: 100%" v-loading="tableLoading" highlight-current-row @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column label="操作" width="90" align="center" fixed="right">
@@ -26,10 +31,6 @@
                        :total="currentItemCount">
         </el-pagination>
       </el-card>
-
-      <div style="display: flex;justify-content: flex-end;margin-top: 16px;">
-        <el-button type="primary" :loading="deleteLoading" size="mini" @click="deleteData">批量删除</el-button>
-      </div>
     </el-dialog>
   </div>
 </template>
@@ -60,6 +61,7 @@ export default {
       size: 10,
       currentPage: 1,
       currentItemCount: 0,
+      type: 0,
       tableLoading: false,
       checkFileListShow: false,
       deleteLoading: false
@@ -98,8 +100,13 @@ export default {
     },
     fatherMethod () {
       console.log( this.$parent, ' this.$parent')
-      this.$parent.getSortList()
-      this.$parent.getMySortList()
+      if (this.type == 1) {
+        this.$parent.getSortList()
+        this.$parent.getMySortList()
+      }
+      if (this.type == 4) {
+        this.$parent.initDatas()
+      }
     },
     trimString (val) {
       return val.substr(1)

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue

@@ -2848,6 +2848,7 @@
       },
       checkFileList () {
         this.$refs.checkFile.checkFileListShow = true
+        this.$refs.checkFile.type = 1
         this.$refs.checkFile.getValue(this.formData.SupplierId, this.formData.SupplierCertId, this.supplierData.OperType === '制造商' ? 1 : 2)
       },
       // 保存信息变更数据

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue

@@ -2024,6 +2024,7 @@
     methods: {
       checkFileList () {
         this.$refs.checkFile.checkFileListShow = true
+        this.$refs.checkFile.type = 1
         this.$refs.checkFile.getValue(this.formData.SupplierId, this.formData.SupplierCertId, this.supplierData.OperType === '制造商' ? 1 : 2)
       },
       equipmentdialog () {

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -2335,6 +2335,7 @@
       },
       checkFileList () {
         this.$refs.checkFile.checkFileListShow = true
+        this.$refs.checkFile.type = 1
         this.$refs.checkFile.getValue(this.formData.SupplierId, this.formData.SupplierCertId, this.supplierData.OperType === '制造商' ? 1 : 2)
       },
       // 保存信息变更数据

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

@@ -531,6 +531,7 @@
     methods: {
       checkFileList () {
         this.$refs.checkFile.checkFileListShow = true
+        this.$refs.checkFile.type = 4
         this.$refs.checkFile.getValue(this.formData.Id, this.certId, this.formData.OperType === '制造商' ? 1 : 2)
       },
       updateInFlag () {

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

@@ -532,6 +532,7 @@
     methods: {
       checkFileList () {
         this.$refs.checkFile.checkFileListShow = true
+        this.$refs.checkFile.type = 4
         this.$refs.checkFile.getValue(this.formData.Id, this.certId, this.formData.OperType === '制造商' ? 1 : 2)
       },
       editIsRestrict (val) {

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

@@ -535,6 +535,7 @@
     methods: {
       checkFileList () {
         this.$refs.checkFile.checkFileListShow = true
+        this.$refs.checkFile.type = 4
         this.$refs.checkFile.getValue(this.formData.Id, this.certId, this.formData.OperType === '制造商' ? 1 : 2)
       },
       updateInFlag () {