浏览代码

文件上传组件span=24;修改沟通详情查看页面

damon227 2 年之前
父节点
当前提交
4334a8d8a7

+ 1 - 1
src/views/modules/common/upload-component-v2.vue

@@ -1,6 +1,6 @@
 <template>
   <section>
-    <el-col :span="8">
+    <el-col :span="24">
       <el-upload
         :disabled="display"
         class="upload-demo"

+ 1 - 1
src/views/modules/common/upload-component.vue

@@ -1,6 +1,6 @@
 <template>
   <section>
-    <el-col :span="8">
+    <el-col :span="24">
       <div v-show="displayTitle" class="title">
         <span v-show="displayStar" style="color: red">*</span> {{ title }}
       </div>

+ 1 - 3
src/views/modules/cus/communicate-add-or-update.vue

@@ -283,7 +283,7 @@
             >
             </el-table-column>
             <el-table-column
-              prop="rank"
+              prop="ranks"
               header-align="center"
               align="center"
               width="120"
@@ -646,8 +646,6 @@ export default {
       });
     },
     attachDetails(attachList) {
-      console.log(22222222222);
-      console.log(attachList);
       attachList.forEach((item) => {
         item.fileName = item.name;
       });

+ 256 - 132
src/views/modules/cus/communicate-detail.vue

@@ -6,90 +6,188 @@
     :visible.sync="visible"> -->
   <div>
     <div class="my-title">查看</div>
-    <div style="margin-left: 20px;margin-right: 20px">
+    <div style="margin-left: 20px; margin-right: 20px">
       <e-desc title="基本信息" column="3">
-        <e-desc-item label="沟通编码">{{dataForm.coCode}}</e-desc-item>
-        <e-desc-item label="客户名称">{{dataForm.customerName}}</e-desc-item>
-        <e-desc-item label="联系人">{{dataForm.bizManagerName}}</e-desc-item>
-        <e-desc-item label="沟通类别">{{dataForm.coTypeValue}}</e-desc-item>
-        <e-desc-item label="备注说明" span="2">{{dataForm.notes}}</e-desc-item>
+        <e-desc-item label="沟通编码">{{ dataForm.coCode }}</e-desc-item>
+        <e-desc-item label="客户名称">{{ dataForm.customerName }}</e-desc-item>
+        <e-desc-item label="客户联系人">{{ dataForm.contact }}</e-desc-item>
+        <e-desc-item label="客户联系电话">{{ dataForm.contactTel }}</e-desc-item>
+        <e-desc-item label="沟通方式">{{ dataForm.way }}</e-desc-item>
+        <e-desc-item label="沟通类别">{{ dataForm.coTypeValue }}</e-desc-item>
+        <e-desc-item label="沟通主要内容" span="3">{{ dataForm.content }}</e-desc-item>
+        <e-desc-item label="备注说明" span="3">{{
+          dataForm.notes
+        }}</e-desc-item>
       </e-desc>
-      <e-desc title="沟通扫描件">
-        <upload-component :display="true" :display-title="false" :accept="'*'" :file-obj-list="fileList"/>
+      <e-desc title="技术资料">
+        <upload-component
+          :display="true"
+          :display-title="false"
+          :accept="'*'"
+          :file-obj-list="dataForm.attachListTechnical || []"
+        />
       </e-desc>
-      <e-desc v-if="Number(dataForm.coType) === 1" title="订单产品明细">
-        <el-table
-          :data="cusRCommProductVOS"
-          border
-          style="width: 100%;">
-          <el-table-column
-            label="序号"
-            type="index"
-            width="50"
-            align="center">
-          </el-table-column>
-          <el-table-column
-            prop="productName"
-            header-align="center"
-            align="center"
-            min-width="140"
-            :show-tooltip-when-overflow="true"
-            label="产品名称">
-          </el-table-column>
-          <el-table-column
-            prop="productSpecifications"
-            header-align="center"
-            align="center"
-            min-width="140"
-            :show-tooltip-when-overflow="true"
-            label="规格">
-          </el-table-column>
-          <el-table-column
-            prop="cnt"
-            header-align="center"
-            align="center"
-            min-width="100"
-            label="数量">
-          </el-table-column>
-          <el-table-column
-            prop="price"
-            header-align="center"
-            align="center"
-            min-width="100"
-            label="含税单价">
-          </el-table-column>
-          <el-table-column
-            prop="amount"
-            header-align="center"
-            align="center"
-            min-width="100"
-            label="含税总价">
-            <template slot-scope="scope">
-              <span>{{ (scope.row.cnt*scope.row.price).toFixed(2) }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="rate"
-            header-align="center"
-            align="center"
-            min-width="100"
-            label="税率">
-            <template slot-scope="scope">
-              <span>
-                {{scope.row.rate}} %
-              </span>
-            </template>
+      <e-desc title="数模/图纸">
+        <upload-component
+          :display="true"
+          :display-title="false"
+          :accept="'*'"
+          :file-obj-list="dataForm.attachListDrawing || []"
+        />
+      </e-desc>
+      <e-desc title="沟通表原件">
+        <upload-component
+          :display="true"
+          :display-title="false"
+          :accept="'*'"
+          :file-obj-list="dataForm.attachList || []"
+        />
+      </e-desc>
+      <e-desc title="其他附件">
+        <upload-component
+          :display="true"
+          :display-title="false"
+          :accept="'*'"
+          :file-obj-list="dataForm.attachListOther || []"
+        />
+      </e-desc>
+      <e-desc title="沟通物料明细">
+        <el-table :data="cusRCommProductVOS" border style="width: 100%">
+          <el-table-column label="序号" type="index" width="50" align="center">
           </el-table-column>
           <el-table-column
-            prop="notes"
-            header-align="center"
-            align="center"
-            width="160"
-            :show-tooltip-when-overflow="true"
-            label="备注">
-          </el-table-column>
+              prop="productName"
+              header-align="center"
+              align="center"
+              min-width="120"
+              :show-tooltip-when-overflow="true"
+              label="物料名称"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="productSpecifications"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="规格"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="cnt"
+              header-align="center"
+              align="center"
+              label="数量"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="deliveryDate"
+              header-align="center"
+              align="center"
+              min-width="100"
+              width="150"
+              label="交付日期"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="notes"
+              header-align="center"
+              align="center"
+              min-width="180"
+              :show-tooltip-when-overflow="true"
+              label="备注"
+            >
+            </el-table-column>
         </el-table>
       </e-desc>
+      <e-desc title="任务工单派发">
+        <el-table :data="dataForm.workInfoList" border style="width: 100%">
+            <el-table-column
+              label="序号"
+              type="index"
+              width="50"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="taskType"
+              header-align="center"
+              align="center"
+              min-width="100"
+              width="120"
+              label="工单类型"
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row.taskTypeName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="taskName"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="工单名称"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="ranks"
+              header-align="center"
+              align="center"
+              width="120"
+              label="级别"
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row.rankTypeName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="content"
+              header-align="center"
+              align="center"
+              min-width="100"
+              label="工单内容"
+              :show-tooltip-when-overflow="true"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="receiver"
+              header-align="center"
+              align="center"
+              width="150"
+              label="任务接收人"
+            >
+              <template slot-scope="scope">
+                <span>{{ scope.row.receiverName }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="attachList"
+              header-align="center"
+              align="center"
+              width="150"
+              label="任务附件"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  :disabled="
+                    !scope.row.attachList || scope.row.attachList.length === 0
+                  "
+                  type="text"
+                  size="small"
+                  @click="attachDetails(scope.row.attachList)"
+                  >查看</el-button
+                >
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="notes"
+              header-align="center"
+              align="center"
+              :show-tooltip-when-overflow="true"
+              label="备注"
+            >
+            </el-table-column>
+          </el-table>
+      </e-desc>
     </div>
     <span slot="footer" class="dialog-footer">
       <el-button @click="onChose">返回</el-button>
@@ -99,69 +197,95 @@
 </template>
 
 <script>
-  import EDesc from '../common/e-desc'
-  import EDescItem from '../common/e-desc-item'
-  import { getCoDetail } from '@/api/cus'
-  import uploadComponent from '../common/upload-component'
-  export default {
-    name: 'communicate-detail',
-    components: {
-      EDesc, EDescItem, uploadComponent
+import EDesc from "../common/e-desc";
+import EDescItem from "../common/e-desc-item";
+import { getCoDetail } from "@/api/cus";
+import uploadComponent from "../common/upload-component-v2";
+export default {
+  name: "communicate-detail",
+  components: {
+    EDesc,
+    EDescItem,
+    uploadComponent,
+  },
+  data() {
+    return {
+      visible: false,
+      id: 0,
+      dataForm: {},
+      cusRCommProductVOS: [],
+      fileList: [],
+    };
+  },
+  methods: {
+    onChose() {
+      this.$emit("onChose");
     },
-    data () {
-      return {
-        visible: false,
-        id: 0,
-        dataForm: {},
-        cusRCommProductVOS: [],
-        fileList: []
-      }
+    async init(id) {
+      this.visible = true;
+      this.id = id || 0;
+      this.dataForm = {};
+      this.cusRCommProductVOS = [];
+      this.fileList = [];
+      this.getDetails();
     },
-    methods: {
-      onChose () {
-        this.$emit('onChose')
-      },
-      async init (id) {
-        this.visible = true
-        this.id = id || 0
-        this.dataForm = {}
-        this.cusRCommProductVOS = []
-        this.fileList = []
-        this.getDetails()
-      },
-      getDetails () {
-        getCoDetail(this.id).then(({data}) => {
-          if (data && data.code === '200') {
-            this.dataForm = data.data
-            // 附件显示
-            this.fileList = []
-            data.data.attachList.forEach((item) => {
-              this.fileList.push({
-                name: item.fileName,
-                url: item.url,
-                id: item.url
-              })
-            })
-            if (data.data.cusRCommProductVOS) {
-              data.data.cusRCommProductVOS.forEach((item) => {
-                this.cusRCommProductVOS.push({
-                  ...item
-                })
-              })
-            }
+    getDetails() {
+      getCoDetail(this.id).then(({ data }) => {
+        if (data && data.code === "200") {
+          this.dataForm = data.data;
+          // 附件显示
+          this.fileList = [];
+          if (this.dataForm.attachListTechnical) {
+            this.dataForm.attachListTechnical.forEach((item) => {
+              item.name = item.fileName;
+              item.id = item.url;
+            });
+          }
+          if (this.dataForm.attachListDrawing) {
+            this.dataForm.attachListDrawing.forEach((item) => {
+              item.name = item.fileName;
+              item.id = item.url;
+            });
           }
-        })
-      }
-    }
-  }
+          if (this.dataForm.attachList) {
+            this.dataForm.attachList.forEach((item) => {
+              item.name = item.fileName;
+              item.id = item.url;
+            });
+          }
+          if (this.dataForm.attachListOther) {
+            this.dataForm.attachListOther.forEach((item) => {
+              item.name = item.fileName;
+              item.id = item.url;
+            });
+          }
+
+          if (data.data.cusRCommProductVOS) {
+            data.data.cusRCommProductVOS.forEach((item) => {
+              this.cusRCommProductVOS.push({
+                ...item,
+              });
+            });
+          }
+        }
+      });
+    },
+    attachDetails(attachList) {
+      attachList.forEach((item) => {
+        item.fileName = item.name;
+      });
+      // this.$refs.attachDetail.init(attachList);
+    },
+  },
+};
 </script>
 
 <style scoped>
-.my-line{
+.my-line {
   border-bottom: 1px solid #c0c4cc;
   margin-bottom: 10px;
 }
-.title{
-  padding: 10px 0 ;
+.title {
+  padding: 10px 0;
 }
 </style>

+ 6 - 6
src/views/modules/worder/add-or-update.vue

@@ -14,14 +14,14 @@
         label-width="120px"
       >
         <el-row class="my-row">
-          <el-col :span="8">
+          <!-- <el-col :span="8">
             <el-form-item label="工单编码" prop="taskCode">
               <el-input
                 v-model="dataForm.taskCode"
                 placeholder="请输入"
               ></el-input>
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <el-col :span="8">
             <el-form-item label="工单类型" prop="taskType">
               <el-select
@@ -39,9 +39,9 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="工单级别" prop="rank">
+            <el-form-item label="工单级别" prop="ranks">
               <el-select
-                v-model="dataForm.rank"
+                v-model="dataForm.ranks"
                 placeholder="请选择"
                 style="width: 100%"
               >
@@ -172,7 +172,7 @@ export default {
         taskType: [
           { required: true, message: "请选择工单类型", trigger: "change" },
         ],
-        rank: [
+        ranks: [
           { required: true, message: "请选择工单级别", trigger: "change" },
         ],
         taskName: [
@@ -213,7 +213,7 @@ export default {
         if (valid) {
           this.visible = false;
           this.dataForm.taskTypeName = this.taskTypeOption.find(t => t.value == this.dataForm.taskType).label;
-          this.dataForm.rankTypeName = this.rankTypeOption.find(t => t.value == this.dataForm.rank).label;
+          this.dataForm.rankTypeName = this.rankTypeOption.find(t => t.value == this.dataForm.ranks).label;
           this.dataForm.receiverName = this.userList.find(t => t.userId == this.dataForm.receiver).name;
           this.$emit("submit", this.dataForm);
         }