Ver código fonte

回收站,项目恢复,客户恢复查重调整,应收账款、应收账款管理明细新增翻页

qymljy 9 meses atrás
pai
commit
45d762ccd0

+ 3 - 0
src/HDrpManagement/ProductGroupMag/modules/add.vue

@@ -243,6 +243,9 @@ export default {
       this.tableData.push(row)
       const res = new Map();
       this.tableData = this.tableData.filter((item) => !res.has(item['itemid']) && res.set(item['itemid'], 1));
+      this.form.itemno = this.tableData[0].itemno
+      this.form.itemid = this.tableData[0].itemid
+      this.form.itemname = this.tableData[0].itemname
     },
     deleteProduct (row) {
       this.tableData = this.tableData.filter(e=>{

+ 3 - 3
src/HManagement/actsRecMag/modules/detailInfo.vue

@@ -11,7 +11,7 @@
         >
       <div class="drawer__panel" style="margin-bottom: 0 !important;">
         <exportFile style="margin-bottom: 20px" :param="param" :columns="tablecols" :fileName="point == '开票'?'客户开票明细':'客户出货明细'" :dataid="param.content.dataid" :custom="true" :point="point"></exportFile>
-        <tableNewLayout :layout="tablecols"  height="calc(100vh - 165px)" :data="list" fixedName="operation" :width="true" :custom="true" :headerOptions="['overdueamount']">
+        <tableNewLayout :layout="tablecols"  height="calc(100vh - 190px)" :data="list" fixedName="operation" :width="true" :custom="true" :headerOptions="['overdueamount']">
           <template v-slot:header="scope">
             <div v-if="scope.column.columnname === 'overdueamount'">
               {{$t(point == '开票'?'开票金额':'出货金额')}}
@@ -28,7 +28,7 @@
           </template>
           <template v-slot:opreation="scope"></template>
         </tableNewLayout>
-<!--        <div class="container normal-panel" style="text-align:right">
+        <div class="container normal-panel" style="text-align:right;padding-bottom: 0px">
           <el-pagination
               background
               @size-change="handleSizeChange"
@@ -39,7 +39,7 @@
               layout="total,sizes, prev, pager, next, jumper"
               :total="total">
           </el-pagination>
-        </div>-->
+        </div>
       </div>
     </el-drawer>
   </div>

+ 62 - 24
src/HManagement/ecycle/modules/recovery.vue

@@ -23,7 +23,29 @@
           <div v-else-if="scope.column.columnname === 'leader'">
             <span>{{scope.column.data.leader?scope.column.data.leader.length !== 0 ? scope.column.data.leader[0].name:'--':'--'}}</span>
           </div>
-          <p v-else>{{scope.column.data[scope.column.columnname]?$t(scope.column.data[scope.column.columnname]):'--'}}</p>
+          <div v-else-if="scope.column.columnname == 'projectname'">
+            <span v-for="item in scope.column.data.projectname" :key="item.index">
+              <span :style="{color:item.color}">{{item.text}}</span>
+            </span>
+          </div>
+          <p v-else>
+            <span v-if="scope.column.data[scope.column.columnname]">
+              <span v-if="type == '客户'">
+                <span :style="{color:scope.column.data.chars[0][scope.column.columnname] && scope.column.data[scope.column.columnname].includes(scope.column.data.chars[0][scope.column.columnname])?'red':'#666'}">
+                  {{scope.column.data[scope.column.columnname]}}
+                </span>
+              </span>
+              <span v-else-if="type == '项目'">
+                <span :style="{color:scope.column.data.chars[scope.column.columnname] && scope.column.data[scope.column.columnname].includes(scope.column.data.chars[scope.column.columnname])?'red':'#666'}">
+                  {{scope.column.data[scope.column.columnname]}}
+                </span>
+              </span>
+              <span v-else>{{scope.column.data[scope.column.columnname]}}</span>
+            </span>
+            <span v-else>
+              --
+            </span>
+          </p>
         </template>
       </tableLayout>
       <div  class="container normal-panel" style="text-align:right">
@@ -79,24 +101,34 @@ export default {
     /*查询规则*/
     async queryRule(){
       if (this.type === '项目' || this.type === '客户'){
-        const res = await this.$api.requested({
-          "id": "20230410090502",
-          "content": {},
-        })
-        if (this.type === '客户'){
-          this.fields1 = res.data.custcheckrule.fields1
-          this.fields2 = res.data.custcheckrule.fields2
-          this.fields3 = res.data.custcheckrule.fields3
+        if (this.type == '项目' && !this.data.projectname){
+          this.$confirm('项目名称为空,不可进行恢复!', '提示', {
+            showCancelButton:false,
+            showClose:false,
+            confirmButtonText: '确定',
+            type: 'warning'
+          }).then(() => {
+          }).catch(() => {
+          });
         }else {
-          this.fields1 = res.data.projectcheckrule.fields1
-          this.fields2 = res.data.projectcheckrule.fields2
-          this.fields3 = res.data.projectcheckrule.fields3
+          const res = await this.$api.requested({
+            "id": "20230410090502",
+            "content": {},
+          })
+          if (this.type === '客户'){
+            this.fields1 = res.data.custcheckrule.fields1
+            this.fields2 = res.data.custcheckrule.fields2
+            this.fields3 = res.data.custcheckrule.fields3
+          }else {
+            this.fields1 = res.data.projectcheckrule.fields1
+            this.fields2 = res.data.projectcheckrule.fields2
+            this.fields3 = res.data.projectcheckrule.fields3
+          }
+          this.queryData()
         }
-        this.queryData()
       }else {
         this.onshow()
       }
-
     },
     async queryData(){
       console.log(this.fields1,'fields1')
@@ -119,16 +151,22 @@ export default {
         this.param.id = 20221208184202
         this.param.content.sa_projectid = this.data.sa_projectid
       }
-      const res = await this.$api.requested(this.param)
-      this.list = res.data
-      this.total = res.total
-      this.currentPage = res.pageNumber
-      console.log(res.data,'是否重复')
-      if (res.data.length > 0){
-        this.dialogTableVisible = true
-      }else {
-        this.onshow()
-      }
+      this.$nextTick(async ()=>{
+        const res = await this.$api.requested(this.param)
+        console.log(res.data,'是否重复')
+        if (res.data.length > 0){
+          if (this.type == '项目'){
+            this.tool.getCheckFontProject(res.data)
+          }
+          this.list = res.data
+          this.total = res.total
+          this.currentPage = res.pageNumber
+          this.dialogTableVisible = true
+        }else {
+          this.onshow()
+        }
+      })
+
     },
     onshow() {
       this.$confirm(this.$t('数据恢复至原账号原位置,是否继续')+'?', this.$t('提示'), {

+ 3 - 3
src/SManagement/actsRec/modules/detailInfo.vue

@@ -11,7 +11,7 @@
         >
       <div class="drawer__panel" style="margin-bottom: 0 !important;">
         <exportFile style="margin-bottom: 20px" :param="param" :columns="tablecols" :fileName="point == '开票'?'客户开票明细':'客户出货明细'" :dataid="param.content.dataid" :custom="true" :point="point"></exportFile>
-        <tableNewLayout :layout="tablecols"  height="calc(100vh - 165px)" :data="list" fixedName="operation" :width="true" :custom="true" :headerOptions="['overdueamount']">
+        <tableNewLayout :layout="tablecols"  height="calc(100vh - 190px)" :data="list" fixedName="operation" :width="true" :custom="true" :headerOptions="['overdueamount']">
           <template v-slot:header="scope">
             <div v-if="scope.column.columnname === 'overdueamount'">
               {{$t(point == '开票'?'开票金额':'出货金额')}}
@@ -28,7 +28,7 @@
           </template>
           <template v-slot:opreation="scope"></template>
         </tableNewLayout>
-<!--        <div class="container normal-panel" style="text-align:right">
+        <div class="container normal-panel" style="text-align:right;padding-bottom: 0px">
           <el-pagination
               background
               @size-change="handleSizeChange"
@@ -39,7 +39,7 @@
               layout="total,sizes, prev, pager, next, jumper"
               :total="total">
           </el-pagination>
-        </div>-->
+        </div>
       </div>
     </el-drawer>
   </div>