Browse Source

前端sdy

zhongtianhaoyuan 3 years ago
parent
commit
da970a359d

+ 8 - 6
src/views/taskManagement/inOutWarehouseTaskEdit.vue

@@ -71,13 +71,14 @@
           </el-form-item>
           </el-form-item>
           <!-- 合同编号 -->
           <!-- 合同编号 -->
           <el-form-item label="合同编号">
           <el-form-item label="合同编号">
-            <el-option
+            <!-- <el-option
               v-for="item in contractNoList"
               v-for="item in contractNoList"
               :key="item.constKey"
               :key="item.constKey"
               :label="item.contractNo"
               :label="item.contractNo"
               :value="item.contractNo"
               :value="item.contractNo"
-            ></el-option>
-            {{dataList.contractNo}}
+            ></el-option> -->
+            <div v-if="dataList.inOutType == '移库入库' || dataList.inOutType == '移库出库'">  {{dataList.moveTaskNo}}</div>
+            <div v-if="dataList.inOutType != '移库入库' || dataList.inOutType != '移库出库'">  {{dataList.contractNo}}</div>
             <!-- </el-select> -->
             <!-- </el-select> -->
           </el-form-item>
           </el-form-item>
           <!-- 货名 -->
           <!-- 货名 -->
@@ -180,13 +181,14 @@
           </el-form-item>
           </el-form-item>
           <!-- 合同编号 -->
           <!-- 合同编号 -->
           <el-form-item label="合同编号">
           <el-form-item label="合同编号">
-            <el-option
+            <!-- <el-option
               v-for="item in contractNoList"
               v-for="item in contractNoList"
               :key="item.constKey"
               :key="item.constKey"
               :label="item.contractNo"
               :label="item.contractNo"
               :value="item.contractNo"
               :value="item.contractNo"
-            ></el-option>
-            {{dataList1.contractNo}}
+            ></el-option> -->
+               <div v-if="dataList.inOutType == '移库入库' || dataList.inOutType == '移库出库'">  {{dataList.moveTaskNo}}</div>
+            <div v-if="dataList.inOutType != '移库入库' || dataList.inOutType != '移库出库'">  {{dataList.contractNo}}</div>
           </el-form-item>
           </el-form-item>
           <!-- 货名 -->
           <!-- 货名 -->
           <el-form-item label="货名" class="huom">
           <el-form-item label="货名" class="huom">

+ 148 - 76
src/views/taskManagement/tranManagementWarehouseInOutTask.vue

@@ -25,7 +25,9 @@
         </ws-button>
         </ws-button>
       </template>
       </template>
       <template slot="right">
       <template slot="right">
-        <span style="width: 70px; display: inline-block;color: #8890B1;">状态:</span>
+        <span style="width: 70px; display: inline-block; color: #8890b1"
+          >状态:</span
+        >
         <ws-select
         <ws-select
           v-model="searchTypeText"
           v-model="searchTypeText"
           placeholder
           placeholder
@@ -38,7 +40,7 @@
             :key="item.value"
             :key="item.value"
             :label="item.value"
             :label="item.value"
             :value="item.value"
             :value="item.value"
-            style="color: #8890B1;"
+            style="color: #8890b1"
           />
           />
         </ws-select>
         </ws-select>
         <ws-input
         <ws-input
@@ -65,7 +67,12 @@
       </template>
       </template>
     </BaseHeaderLayout>
     </BaseHeaderLayout>
     <div class="navv">
     <div class="navv">
-      <el-table class="wenzi" :data="gainList.records" style="width: 100%;" height="780">
+      <el-table
+        class="wenzi"
+        :data="gainList.records"
+        style="width: 100%"
+        height="780"
+      >
         <el-table-column type="index" label="序号">
         <el-table-column type="index" label="序号">
           <template scope="scope">
           <template scope="scope">
             <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
             <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
@@ -73,13 +80,56 @@
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column prop="inOutTaskNo" label="任务编号"></el-table-column>
         <el-table-column prop="inOutTaskNo" label="任务编号"></el-table-column>
-        <el-table-column prop="contractNo" label="合同编号" width="80"></el-table-column>
-        <el-table-column prop="warehouseName" class="table_td" label="库房名"></el-table-column>
-        <el-table-column prop="inOutType" class="table_td" label="出入库类型"></el-table-column>
-        <el-table-column prop="goodsName" class="table_td" label="货名"></el-table-column>
-        <el-table-column prop="weight" class="table_td" label="重量(吨)"></el-table-column>
-        <el-table-column prop="predictDate" class="table_td" label="预计日期"></el-table-column>
-        <el-table-column prop="publisher" class="table_td" label="发布者"></el-table-column>
+        <el-table-column prop="contractNo" label="合同编号" width="80">
+          <template scope="scope">
+            <div
+              v-if="
+                scope.row.inOutType == '移库入库' ||
+                scope.row.inOutType == '移库出库'
+              "
+            >
+              {{ scope.row.moveTaskNo }}
+            </div>
+            <div
+              v-if="
+                scope.row.inOutType != '移库入库' ||
+                scope.row.inOutType != '移库出库'
+              "
+            >
+              {{ scope.row.contractNo }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="warehouseName"
+          class="table_td"
+          label="库房名"
+        ></el-table-column>
+        <el-table-column
+          prop="inOutType"
+          class="table_td"
+          label="出入库类型"
+        ></el-table-column>
+        <el-table-column
+          prop="goodsName"
+          class="table_td"
+          label="货名"
+        ></el-table-column>
+        <el-table-column
+          prop="weight"
+          class="table_td"
+          label="重量(吨)"
+        ></el-table-column>
+        <el-table-column
+          prop="predictDate"
+          class="table_td"
+          label="预计日期"
+        ></el-table-column>
+        <el-table-column
+          prop="publisher"
+          class="table_td"
+          label="发布者"
+        ></el-table-column>
         <el-table-column prop="taskStatus" label="状态">
         <el-table-column prop="taskStatus" label="状态">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-popover
             <el-popover
@@ -91,19 +141,33 @@
             >
             >
               <template>
               <template>
                 <span slot="reference">
                 <span slot="reference">
-                  <span v-if="scope.row.taskStatus == '待审核'" class="executory"></span>
-                  <span v-if="scope.row.taskStatus == '执行中'" class="inExecution"></span>
-                  <span v-if="scope.row.taskStatus == '已完成'" class="done"></span>
+                  <span
+                    v-if="scope.row.taskStatus == '待审核'"
+                    class="executory"
+                  ></span>
+                  <span
+                    v-if="scope.row.taskStatus == '执行中'"
+                    class="inExecution"
+                  ></span>
+                  <span
+                    v-if="scope.row.taskStatus == '已完成'"
+                    class="done"
+                  ></span>
                   {{ scope.row.taskStatus }}
                   {{ scope.row.taskStatus }}
                 </span>
                 </span>
               </template>
               </template>
               <div>
               <div>
                 <p style="margin-top: 0; padding-left: 10px">操作历史</p>
                 <p style="margin-top: 0; padding-left: 10px">操作历史</p>
                 <div v-for="(item, index) in historyList" class="flex">
                 <div v-for="(item, index) in historyList" class="flex">
-                  <div class="vertical-text vertical-text-left">{{ item.updateDate }}</div>
+                  <div class="vertical-text vertical-text-left">
+                    {{ item.updateDate }}
+                  </div>
                   <div>
                   <div>
                     <div class="vertical-circle"></div>
                     <div class="vertical-circle"></div>
-                    <div v-if="index != historyList.length - 1" class="vertical-line"></div>
+                    <div
+                      v-if="index != historyList.length - 1"
+                      class="vertical-line"
+                    ></div>
                   </div>
                   </div>
                   <div class="vertical-text">
                   <div class="vertical-text">
                     {{ item.operateUser }}
                     {{ item.operateUser }}
@@ -123,25 +187,41 @@
             />
             />
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column prop="establishDate" class="table_td" label="创建时间"></el-table-column>
+        <el-table-column
+          prop="establishDate"
+          class="table_td"
+          label="创建时间"
+        ></el-table-column>
         <el-table-column prop="seller" label="操作" width="300">
         <el-table-column prop="seller" label="操作" width="300">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <div
-              class="record"
+            <span class="corles"
               @click="nocomplete(scope.row)"
               @click="nocomplete(scope.row)"
               v-hasPermission="
               v-hasPermission="
                 `warehouseManagement.warehouse.warehouseInfoTask.View`
                 `warehouseManagement.warehouse.warehouseInfoTask.View`
               "
               "
-            >查看</div>
-            <div
+              >查看</span
+            >
+            <el-divider
+              direction="vertical"
+              v-if="scope.row.taskStatus == '待审核'"
+            ></el-divider>
+            <span class="corles"
               v-hasPermission="
               v-hasPermission="
                 `warehouseManagement.warehouse.warehouseInfoTask.audit`
                 `warehouseManagement.warehouse.warehouseInfoTask.audit`
               "
               "
               v-if="scope.row.taskStatus == '待审核'"
               v-if="scope.row.taskStatus == '待审核'"
-              class="adjustment"
               @click="audit(scope.row)"
               @click="audit(scope.row)"
-            >审核</div>
-            <div
+              >审核</span
+            >
+            <el-divider
+              direction="vertical"
+              class="divider"
+              v-if="
+                scope.row.taskStatus == '执行中' ||
+                scope.row.taskStatus == '已驳回'
+              "
+            ></el-divider>
+            <span class="corles"
               v-hasPermission="
               v-hasPermission="
                 `warehouseManagement.warehouse.warehouseInfoTask.edit`
                 `warehouseManagement.warehouse.warehouseInfoTask.edit`
               "
               "
@@ -149,19 +229,21 @@
                 scope.row.taskStatus == '执行中' ||
                 scope.row.taskStatus == '执行中' ||
                 scope.row.taskStatus == '已驳回'
                 scope.row.taskStatus == '已驳回'
               "
               "
-              class="record"
               @click="delivery(scope.row)"
               @click="delivery(scope.row)"
-            >编辑</div>
-            <div
+              >编辑</span
+            >
+            <el-divider
+              direction="vertical"
+              v-if="scope.row.taskId == null"
+            ></el-divider>
+            <span class="corles"
               v-hasPermission="
               v-hasPermission="
                 `warehouseManagement.warehouse.warehouseInfoTask.delete`
                 `warehouseManagement.warehouse.warehouseInfoTask.delete`
               "
               "
-              v-if="
-                scope.row.taskId==null
-              "       
-              class="adjustment"
+              v-if="scope.row.taskId == null"
               @click="deleteclick(scope.row)"
               @click="deleteclick(scope.row)"
-            >删除</div>
+              >删除</span
+            >
           </template>
           </template>
         </el-table-column>
         </el-table-column>
       </el-table>
       </el-table>
@@ -186,7 +268,7 @@ export default {
   name: 'viewSpareMoney',
   name: 'viewSpareMoney',
   components: {
   components: {
     WsUpload,
     WsUpload,
-    Pagination
+    Pagination,
   },
   },
   watch: {
   watch: {
     vesselId(val) {
     vesselId(val) {
@@ -194,7 +276,7 @@ export default {
     },
     },
     isShow(val) {
     isShow(val) {
       this.showType = val
       this.showType = val
-    }
+    },
   },
   },
   data() {
   data() {
     return {
     return {
@@ -223,7 +305,7 @@ export default {
         { value: '执行中', type: 3 },
         { value: '执行中', type: 3 },
         { value: '已驳回', type: 2 },
         { value: '已驳回', type: 2 },
         { value: '已完成', type: 4 },
         { value: '已完成', type: 4 },
-        { value: '全部任务', type: '' }
+        { value: '全部任务', type: '' },
       ],
       ],
       // 提交类型
       // 提交类型
       submitType: true,
       submitType: true,
@@ -235,17 +317,21 @@ export default {
       deptCircularPage: {},
       deptCircularPage: {},
       historyList: [],
       historyList: [],
       pickerBeginDateBefore: {
       pickerBeginDateBefore: {
-        disabledDate: time => {
+        disabledDate: (time) => {
           return time.getTime() > Date.now()
           return time.getTime() > Date.now()
-        }
+        },
       },
       },
-      accessoryTFs: false
+      accessoryTFs: false,
     }
     }
   },
   },
   activated() {
   activated() {
     this.getList()
     this.getList()
     this.showType = this.isShow
     this.showType = this.isShow
   },
   },
+  mounted() {
+    this.getList()
+    this.showType = this.isShow
+  },
   methods: {
   methods: {
     //添加
     //添加
     handleAdd() {
     handleAdd() {
@@ -270,17 +356,16 @@ export default {
       this.$confirm(text, {
       this.$confirm(text, {
         confirmButtonText: '确定',
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         cancelButtonText: '取消',
-        type: 'warning'
+        type: 'warning',
       })
       })
         .then(() => {
         .then(() => {
-          console.log(row)
           outdelete({
           outdelete({
             id: row.id,
             id: row.id,
             relevanceId: row.relevanceId,
             relevanceId: row.relevanceId,
-            inOutFlag: row.inOutFlag
+            inOutFlag: row.inOutFlag,
           })
           })
             .toPromise()
             .toPromise()
-            .then(response => {
+            .then((response) => {
               this.getList()
               this.getList()
             })
             })
         })
         })
@@ -294,11 +379,10 @@ export default {
         currentPage: this.currentPage,
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         pageSize: this.pageSize,
         searchType: this.searchType,
         searchType: this.searchType,
-        searchKeyWord: this.searchKeyWord
+        searchKeyWord: this.searchKeyWord,
       })
       })
         .toPromise()
         .toPromise()
-        .then(response => {
-          console.log(response)
+        .then((response) => {
           this.gainList = response
           this.gainList = response
           this.currentPage = response.current
           this.currentPage = response.current
           this.pageSize = response.size
           this.pageSize = response.size
@@ -310,8 +394,8 @@ export default {
       this.$router.push({
       this.$router.push({
         path: 'tranManagementWarehouseInOutTaskEdit',
         path: 'tranManagementWarehouseInOutTaskEdit',
         query: {
         query: {
-          relevanceId: item.relevanceId
-        }
+          relevanceId: item.relevanceId,
+        },
       })
       })
     },
     },
     audit(item) {
     audit(item) {
@@ -319,8 +403,8 @@ export default {
         path: 'tranManagementWarehouseInOutTaskaudit',
         path: 'tranManagementWarehouseInOutTaskaudit',
         query: {
         query: {
           relevanceId: item.relevanceId,
           relevanceId: item.relevanceId,
-          taskId: item.taskId
-        }
+          taskId: item.taskId,
+        },
       })
       })
     },
     },
     getSpanArr(data) {
     getSpanArr(data) {
@@ -359,8 +443,8 @@ export default {
       this.$router.push({
       this.$router.push({
         path: 'inOutWarehouseTaskEdit',
         path: 'inOutWarehouseTaskEdit',
         query: {
         query: {
-          relevanceId: row.relevanceId
-        }
+          relevanceId: row.relevanceId,
+        },
       })
       })
     },
     },
     dateFormat(fmt, date) {
     dateFormat(fmt, date) {
@@ -369,7 +453,7 @@ export default {
         'Y+': date.getFullYear().toString(), // 年
         'Y+': date.getFullYear().toString(), // 年
         'm+': (date.getMonth() + 1).toString(), // 月
         'm+': (date.getMonth() + 1).toString(), // 月
         'd+': date.getDate().toString(), // 日
         'd+': date.getDate().toString(), // 日
-        'H+': date.getHours().toString() // 时
+        'H+': date.getHours().toString(), // 时
         // "M+": date.getMinutes().toString(),         // 分
         // "M+": date.getMinutes().toString(),         // 分
         // "S+": date.getSeconds().toString()          // 秒
         // "S+": date.getSeconds().toString()          // 秒
         // 有其他格式化字符需求可以继续添加,必须转化成字符串
         // 有其他格式化字符需求可以继续添加,必须转化成字符串
@@ -409,19 +493,19 @@ export default {
       this.$confirm(`是否将状态改为${status}`, {
       this.$confirm(`是否将状态改为${status}`, {
         confirmButtonText: '确定',
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         cancelButtonText: '取消',
-        type: 'warning'
+        type: 'warning',
       })
       })
         .then(() => {
         .then(() => {
           movestates({ id: row.id })
           movestates({ id: row.id })
             .toPromise()
             .toPromise()
-            .then(response => {
+            .then((response) => {
               this.$notify.success({
               this.$notify.success({
                 title: '成功',
                 title: '成功',
-                message: '状态修改成功'
+                message: '状态修改成功',
               })
               })
               this.getList()
               this.getList()
             })
             })
-            .catch(response => {
+            .catch((response) => {
               // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
               // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
             })
             })
         })
         })
@@ -439,7 +523,7 @@ export default {
     handleExamine(row) {
     handleExamine(row) {
       this.$router.push({
       this.$router.push({
         name: 'salesContractExamine',
         name: 'salesContractExamine',
-        query: { id: row.id }
+        query: { id: row.id },
       })
       })
     },
     },
     // 关闭 dialog时 处理文件url 初始化upload组件
     // 关闭 dialog时 处理文件url 初始化upload组件
@@ -449,15 +533,15 @@ export default {
     history(row) {
     history(row) {
       billoperatehis({ id: row.id })
       billoperatehis({ id: row.id })
         .toPromise()
         .toPromise()
-        .then(response => {
+        .then((response) => {
           this.historyList = response
           this.historyList = response
         })
         })
     },
     },
     find() {
     find() {
       this.currentPage = 1
       this.currentPage = 1
       this.getList()
       this.getList()
-    }
-  }
+    },
+  },
 }
 }
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
@@ -503,23 +587,7 @@ export default {
 /deep/.el-table tr th.is-leaf:first-child {
 /deep/.el-table tr th.is-leaf:first-child {
   border-left: 1px solid #e9ecf7;
   border-left: 1px solid #e9ecf7;
 }
 }
-.record,
-.adjustment {
-  display: inline-block;
-  color: #5878e8;
-  padding: 0 4px !important;
-  position: relative;
-}
-.record:after {
-  position: absolute;
-  content: '';
-  display: block;
-  top: 5px;
-  right: -2px;
-  width: 1px;
-  height: 12px;
-  background: #e9ecf7;
-}
+
 .el-row {
 .el-row {
   height: 50px;
   height: 50px;
 }
 }
@@ -574,4 +642,8 @@ export default {
 /deep/.typeselect .el-input__inner {
 /deep/.typeselect .el-input__inner {
   color: #8890b1;
   color: #8890b1;
 }
 }
+.corles{
+  color: #5878E8;
+  font-size: 14px;
+}
 </style>
 </style>

+ 12 - 8
src/views/taskManagement/tranManagementWarehouseInOutTaskAudit.vue

@@ -991,7 +991,7 @@ export default {
           warehousetask(list)
           warehousetask(list)
             .toPromise()
             .toPromise()
             .then((response) => {
             .then((response) => {
-              woekflowhandle({taskId:list.taskId,approved:true,auditMind:this.auditMind,needReapply:false}).toPromise()
+              woekflowhandle({taskId:list.taskId,approved:false,auditMind:this.auditMind,needReapply:true}).toPromise()
             .then((response) => {
             .then((response) => {
               this.$message.success('驳回成功')
               this.$message.success('驳回成功')
               this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
               this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
@@ -1004,19 +1004,14 @@ export default {
       this.dataList.inOutFlag=1
       this.dataList.inOutFlag=1
       this.dataList1.inOutFlag=2
       this.dataList1.inOutFlag=2
       if (this.dataList.taskTypeKey == 1) {
       if (this.dataList.taskTypeKey == 1) {
-        
-        this.dataList.inOutTaskNo = this.inOutTaskNo
         this.requestadd(this.dataList)
         this.requestadd(this.dataList)
       } else if (this.dataList1.taskTypeKey == 2) {
       } else if (this.dataList1.taskTypeKey == 2) {
-        this.dataList1.inOutTaskNo = this.inOutTaskNo1
         this.requestadd(this.dataList1)
         this.requestadd(this.dataList1)
       } else if (
       } else if (
         this.dataList.taskTypeKey == 3 ||
         this.dataList.taskTypeKey == 3 ||
         this.dataList.taskTypeKey == 4
         this.dataList.taskTypeKey == 4
       ) {
       ) {
-        this.dataList.inOutTaskNo = this.inOutTaskNo
         this.requestadd(this.dataList, 'repetition')
         this.requestadd(this.dataList, 'repetition')
-        this.dataList1.inOutTaskNo = this.inOutTaskNo1
         if(!this.deletetask){
         if(!this.deletetask){
           this.requestadd(this.dataList1, 'repetition')
           this.requestadd(this.dataList1, 'repetition')
         }
         }
@@ -1184,9 +1179,18 @@ export default {
         outexamine({ relevanceId: this.$route.query.relevanceId })
         outexamine({ relevanceId: this.$route.query.relevanceId })
           .toPromise()
           .toPromise()
           .then((response) => {
           .then((response) => {
+
             if (response.length > 1) {
             if (response.length > 1) {
-              this.dataList = response[0]
-              this.dataList1 = response[1]
+              if(response[0].taskTypeKey==3){
+                if(response[0].inOutType=='移库出库'){
+                  this.dataList = response[0]
+                  this.dataList1 = response[1]
+                }else{
+                  this.dataList = response[1]
+                  this.dataList1 = response[0]
+                }
+              }
+              
             } else {
             } else {
               if(response[0].taskTypeKey==3){
               if(response[0].taskTypeKey==3){
                 this.deletetask=true
                 this.deletetask=true