Przeglądaj źródła

物资增项修改

huahaiyan 6 lat temu
rodzic
commit
6c4f6ce36e

+ 12 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -174,9 +174,20 @@ func (this *OilSupplierCertAppendController) AddAppend() {
 	var cermodel suppliercert.OilSupplierCert
 	var model suppliercertappend.OilSupplierCertAppend
 	json.Unmarshal(jsonblob, &model)
-	where := " Id = "+ utils.ToStr(model.SupplierCertId)+ " and SupplierTypeCode = "+ model.AppendType
+	where := " Id = "+ utils.ToStr(model.SupplierCertId)+ " and SupplierTypeCode = '"+ model.AppendType +"'"
 	svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
+	where_app := " SupplierCertId = "+ utils.ToStr(model.SupplierCertId)+ " and SupplierId = "+ utils.ToStr(model.SupplierId)+ " and AppendType = '"+ model.AppendType +"'"
+	where_app += " and Status < 6"
+	has := svc.GetEntityByWhere(OilSupplierCertAppendName, where_app, &model)
+	if has {
+		errinfo.Message = "已提交增项申请,审批通过后才可再提交申请!"
+		errinfo.Code = -1
+		errinfo.Info = model.Id
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
 	svc.GetEntityByWhere(OilSupplierCertName, where, &cermodel)
+
 	//if cermodel.Status != "8" {
 	//	errinfo.Message = "入库后才能提交增项!"
 	//	errinfo.Code = -1

+ 18 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappendsub.go

@@ -57,6 +57,24 @@ func (this *OilSupplierCertAppendSubController) GetList() {
 	this.ServeJSON()
 }
 
+// @Title 获取列表
+// @Description 获取列表
+// @Success 200 {object} []suppliercertappendsub.OilSupplierCertAppendSub
+// @router /getMyList [get]
+func (this *OilSupplierCertAppendSubController) GetMyList() {
+	SupplierCertId := this.GetString("SupCertId")
+	SupplierTypeCode := this.GetString("SupTypeCode")
+	SuppAppendId := this.GetString("SupplierCertAppendId")
+	suwhere := " SupplierCertId = "+ SupplierCertId+ " and SupplierTypeCode = '"+ SupplierTypeCode +"' and SupplierCertAppendId = "+ SuppAppendId
+	svc := suppliercertappendsub.GetOilSupplierCertAppendSubService(utils.DBE)
+	var list []suppliercertsub.OilSupplierCertSub
+	svc.GetEntitysByOrderbyWhere(OilSupplierCertSubName, suwhere,"CreateOn asc", &list)
+	var datainfo ErrorDataInfo
+	datainfo.Item = list
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
 // @Title 获取列表
 // @Description 获取列表
 // @Success 200 {object} []suppliercertappendsub.OilSupplierCertAppendSub

+ 7 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplierappendsub.js

@@ -6,6 +6,13 @@ export default {
       params: params
     });
   },
+  getMyList(params, myAxios) {
+    return myAxios({
+      url: '/suppliercertappendsub/getMyList',
+      method: 'GET',
+      params: params
+    });
+  },
   getListAppend(params, myAxios) {
     return myAxios({
       url: '/suppliercertappendsub/getListappend',

+ 49 - 20
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue

@@ -60,29 +60,58 @@
           </el-form>
         </el-card>
         <!-- 增项分类列表 -->
-        <el-card class="box-card" style="margin-top: 10px;">
-          <div slot="header">
-            <span><i class="icon icon-table2"></i> 增项分类</span>
-            <el-button style="float: right; padding: 3px 0" type="text"
-              v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button>
-          </div>
-          <el-table :data="entityList" size="mini" border style="width: 100%" @sort-change="orderby">
-            <el-table-column label="操作" min-width="100" align="center" fixed>
-              <template slot-scope="scope">
-                <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
-                  :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
-              </template>
-            </el-table-column>
-            <!-- <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column> -->
-            <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
-          </el-table>
-          <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        <el-row :gutter="2">
+          <el-col :span="12">
+            <el-card class="box-card" style="margin-top: 10px;">
+              <div slot="header">
+                <span><i class="icon icon-table2"></i> 增项分类</span>
+                <el-button style="float: right; padding: 3px 0" type="text"
+                  v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button>
+              </div>
+              <el-table :data="entityList" size="mini" border style="width: 100%" @sort-change="orderby">
+                <el-table-column label="操作" min-width="100" align="center" fixed>
+                  <template slot-scope="scope">
+                    <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
+                      :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
+                  </template>
+                </el-table-column>
+                <!-- <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column> -->
+                <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
+              </el-table>
+              <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
             :current-page="currentPage" :page-sizes="[10, 15, 20, 25]" :page-size="size"
             layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
           </el-pagination> -->
-        </el-card>
+            </el-card>
+          </el-col>
+          <el-col :span="12">
+            <el-card class="box-card" style="margin-top: 10px;">
+              <div slot="header">
+                <span><i class="icon icon-table2"></i> 增项分类</span>
+                <el-button style="float: right; padding: 3px 0" type="text"
+                  v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button>
+              </div>
+              <el-table :data="entityList" size="mini" border style="width: 100%" @sort-change="orderby">
+                <el-table-column label="操作" min-width="100" align="center" fixed>
+                  <template slot-scope="scope">
+                    <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
+                      :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
+                  </template>
+                </el-table-column>
+                <!-- <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column> -->
+                <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
+              </el-table>
+              <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+            :current-page="currentPage" :page-sizes="[10, 15, 20, 25]" :page-size="size"
+            layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+          </el-pagination> -->
+            </el-card>
+          </el-col>
+        </el-row>
         <el-card class="box-card" style="margin-top: 10px;">
           <div slot="header" class="clearfix">
             <span><i class="icon icon-table2"></i> 企业资质</span>

+ 75 - 21
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue

@@ -68,29 +68,58 @@
           </el-form>
         </el-card>
         <!-- 增项分类列表 -->
-        <el-card class="box-card" style="margin-top: 10px;">
-          <div slot="header">
-            <span><i class="icon icon-table2"></i> 增项分类</span>
-            <el-button style="float: right; padding: 3px 0" type="text"
-              v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button>
-          </div>
-          <el-table :data="entityList" size="mini" border style="width: 100%" @sort-change="orderby">
-            <el-table-column label="操作" min-width="100" align="center" fixed>
-              <template slot-scope="scope">
-                <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
-                  :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
-              </template>
-            </el-table-column>
-            <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
-          </el-table>
-          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        <el-row :gutter="2">
+          <el-col :span="12">
+            <el-card class="box-card" style="margin-top: 10px;height: calc(100vh - 353px);overflow: auto">
+              <div slot="header">
+                <span><i class="icon icon-table2"></i> 所有增项分类</span>
+                <!-- <el-button style="float: right; padding: 3px 0" type="text"
+                  v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button> -->
+              </div>
+              <el-table :data="entityList" size="mini" border style="width: 100%" @sort-change="orderby">
+                <!-- <el-table-column label="操作" min-width="100" align="center" fixed>
+                  <template slot-scope="scope">
+                    <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
+                      :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
+                  </template>
+                </el-table-column> -->
+                <!-- <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column> -->
+                <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
+              </el-table>
+              <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
             :current-page="currentPage" :page-sizes="[10, 15, 20, 25]" :page-size="size"
             layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
-          </el-pagination>
-        </el-card>
+          </el-pagination> -->
+            </el-card>
+          </el-col>
+          <el-col :span="12">
+            <el-card class="box-card" style="margin-top: 10px;height: calc(100vh - 353px);overflow: auto">
+              <div slot="header">
+                <span><i class="icon icon-table2"></i> 新增增项分类</span>
+                <el-button style="float: right; padding: 3px 0" type="text"
+                  v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button>
+              </div>
+              <el-table :data="myentityList" size="mini" border style="width: 100%" @sort-change="orderby">
+                <el-table-column label="操作" min-width="100" align="center" fixed>
+                  <template slot-scope="scope">
+                    <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
+                      :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
+                  </template>
+                </el-table-column>
+                <!-- <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column> -->
+                <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
+              </el-table>
+              <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+            :current-page="currentPage" :page-sizes="[10, 15, 20, 25]" :page-size="size"
+            layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+          </el-pagination> -->
+            </el-card>
+          </el-col>
+        </el-row>
         <el-card class="box-card" style="margin-top: 10px;">
           <div slot="header" class="clearfix">
             <span><i class="icon icon-table2"></i> 企业资质</span>
@@ -410,6 +439,7 @@
         },
         //列表数据
         entityList: [],
+        myentityList: [],
         //分页参数
         size: 10,
         currentPage: 1,
@@ -599,6 +629,7 @@
           //显示公司名
           _this.supplierOptions = _this.formData.SupplierId.toString()
           _this.getSortList()
+          _this.getMySortList()
         }).catch(err => {
           console.error(err)
         })
@@ -839,6 +870,28 @@
           console.error(err)
         })
       },
+      //获取增项分类表
+      getMySortList() {
+        //分页及列表条件
+        let params = {
+          // _currentPage: this.currentPage,
+          // _size: this.size,
+          // Order: this.Column.Order,
+          // Prop: this.Column.Prop,
+          SupplierCertAppendId: this.dialogFormData.SupplierCertAppendId,
+          SupCertId: this.formData.SupplierCertId,
+          SupTypeCode: this.formData.AppendType,
+        };
+
+        //访问接口
+        api.getMyList(params, this.$axios).then(res => {
+          this.myentityList = res.data.item
+          console.log("------res.entityList==--", this.entityList)
+          // this.currentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
 
       //添加增项信息
       addAppend() {
@@ -993,6 +1046,7 @@
               _this.dialogVisible = false
               //更新增项分类表
               _this.getSortList()
+              _this.getMySortList()
             } else {
               _this.$message({
                 type: 'warning',

+ 51 - 20
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -71,28 +71,59 @@
           </el-form>
         </el-card>
         <!-- 增项分类列表 -->
-        <el-card class="box-card" style="margin-top: 10px;">
-          <div slot="header">
-            <span><i class="icon icon-table2"></i> 增项分类</span>
-            <el-button style="float: right; padding: 3px 0" type="text" v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button>
-          </div>
-          <el-table :data="entityList" border size="mini" style="width: 100%" @sort-change="orderby">
-            <el-table-column label="操作" min-width="100" align="center" fixed>
-              <template slot-scope="scope">
-                <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
-                  :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
-              </template>
-            </el-table-column>
-            <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
-            <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
-          </el-table>
-          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        <!-- 增项分类列表 -->
+        <el-row :gutter="2">
+          <el-col :span="12">
+            <el-card class="box-card" style="margin-top: 10px;">
+              <div slot="header">
+                <span><i class="icon icon-table2"></i> 增项分类</span>
+                <el-button style="float: right; padding: 3px 0" type="text"
+                  v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button>
+              </div>
+              <el-table :data="entityList" size="mini" border style="width: 100%" @sort-change="orderby">
+                <el-table-column label="操作" min-width="100" align="center" fixed>
+                  <template slot-scope="scope">
+                    <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
+                      :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
+                  </template>
+                </el-table-column>
+                <!-- <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column> -->
+                <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
+              </el-table>
+              <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
             :current-page="currentPage" :page-sizes="[10, 15, 20, 25]" :page-size="size"
             layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
-          </el-pagination>
-        </el-card>
+          </el-pagination> -->
+            </el-card>
+          </el-col>
+          <el-col :span="12">
+            <el-card class="box-card" style="margin-top: 10px;">
+              <div slot="header">
+                <span><i class="icon icon-table2"></i> 增项分类</span>
+                <el-button style="float: right; padding: 3px 0" type="text"
+                  v-if="formData.Status <= 0 && formData.Status != -5" @click="addSortData()">添加</el-button>
+              </div>
+              <el-table :data="entityList" size="mini" border style="width: 100%" @sort-change="orderby">
+                <el-table-column label="操作" min-width="100" align="center" fixed>
+                  <template slot-scope="scope">
+                    <el-button type="primary" title="删除" size="mini" plain @click="deleteData(scope.row.Id)"
+                      :disabled="scope.row.Type == '1'||formData.Status > 0">删除</el-button>
+                  </template>
+                </el-table-column>
+                <!-- <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column> -->
+                <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+                <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
+              </el-table>
+              <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+            :current-page="currentPage" :page-sizes="[10, 15, 20, 25]" :page-size="size"
+            layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+          </el-pagination> -->
+            </el-card>
+          </el-col>
+        </el-row>
         <el-card class="box-card" style="margin-top: 10px;">
           <div slot="header" class="clearfix">
             <span><i class="icon icon-table2"></i> 企业资质</span>