damon227 1 rok pred
rodič
commit
7800af0922

+ 255 - 0
src/views/modules/cus/quoted-notify.vue

@@ -0,0 +1,255 @@
+<<template>
+  <div>
+    <div class="my-title">通知报价</div>
+      <el-form   
+        :model="dataForm"
+        :rules="dataRule"
+        ref="dataForm"
+        label-width="160px"
+      >
+        <el-row>
+          <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>{{
+                  taskTypeOption.findIndex(
+                    (t) => t.value == scope.row.taskType
+                  ) > -1
+                    ? taskTypeOption.find((t) => t.value == scope.row.taskType)
+                        .label
+                    : ""
+                }}</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>{{
+                  rankTypeOption.findIndex((t) => t.value == scope.row.ranks) >
+                  -1
+                    ? rankTypeOption.find((t) => t.value == scope.row.ranks)
+                        .label
+                    : ""
+                }}</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="attachListVo"
+              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-column
+              fixed="right"
+              header-align="center"
+              align="center"
+              width="100"
+              label="操作"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  size="small"
+                  @click="updateWorderHandle(scope.row)"
+                  >编辑</el-button
+                >
+                <el-button
+                  style="color: red"
+                  type="text"
+                  size="small"
+                  @click="removeWorkInfoItem(scope.$index)"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-row>
+        <el-row style="text-align: center; margin-top: 10px">
+          <el-button
+            type="primary"
+            icon="el-icon-plus"
+            @click="inBound"
+          ></el-button>
+        </el-row>
+      </el-form>
+
+      <span slot="footer" class="dialog-footer">
+      <el-button @click="onChose">取消</el-button>
+      <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
+    </span>
+
+    <worder-add-or-update-dialog
+      v-if="worderVisible"
+      ref="worder"
+      @submit="addWorderItem"
+    />
+  </div>
+</template>
+
+<script>
+import WorderAddOrUpdateDialog from '../worder/add-or-update-dialog'
+import {
+  taskTypeOption,
+  rankTypeOption
+} from '@/utils/enums'
+export default {
+  name: '',
+  components: {WorderAddOrUpdateDialog},
+  props: {},
+  data () {
+    return {
+      stateOption: [
+        { label: '通过', value: 1 },
+        { label: '不通过', value: 2 }
+      ],
+      taskTypeOption: taskTypeOption,
+      rankTypeOption: rankTypeOption,
+      worderVisible: false,
+      dataForm: {
+        workInfoList: []
+      },
+      dataRule: {
+        state: [{required: true, message: '请选择', trigger: 'change'}]
+      }
+    }
+  },
+  watch: {},
+  computed: {},
+  created () {},
+  mounted () {},
+  activated () {},
+  methods: {
+    onChose () {
+      this.$emit('onChose')
+    },
+    async init (id) {
+      this.dataForm.priceId = id
+    },
+    inBound () {
+      this.worderVisible = true
+      this.$nextTick(() => {
+        this.$refs.worder.init(1)
+      })
+    },
+    addWorderItem (item) {
+      if (!item.recordId) {
+        item.recordId = Math.round(Math.random() * 1000000)
+      }
+      if (
+        this.dataForm.workInfoList.findIndex(
+          (item1) => item1.recordId === item.recordId
+        ) === -1
+      ) {
+        this.dataForm.workInfoList.push({
+          ...item
+        })
+      }
+    },
+    removeWorkInfoItem (index) {
+      this.dataForm.workInfoList.splice(index, 1)
+    },
+    updateWorderHandle (row) {
+      this.worderVisible = true
+      this.$nextTick(() => {
+        this.$refs.worder.init(1, row)
+      })
+    },
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl(`/biz-service/WorkController/insertBatch`),
+            method: 'post',
+            data: this.$http.adornData({ ...this.dataForm, orgId: this.orgId })
+          }).then(({ data }) => {
+            if (data && data.code === '200') {
+              this.$message({
+                message: '操作成功',
+                type: 'success',
+                duration: 1500,
+                onClose: () => {
+                  this.onChose()
+                  this.$emit('refreshDataList')
+                }
+              })
+            } else {
+              this.$message.error(data.msg)
+            }
+          })
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+</style>

+ 13 - 4
src/views/modules/cus/quoted.vue

@@ -1,7 +1,7 @@
 <!-- 报价管理 -->
 <template>
   <div>
-    <template v-if="!addOrUpdateVisible && !detailVisible && !priceVisible && !accreditVisible && !resultVisible">
+    <template v-if="!addOrUpdateVisible && !detailVisible && !priceVisible && !accreditVisible && !resultVisible && !notifyVisible">
       <el-form
         :inline="true"
         :model="dataForm"
@@ -254,10 +254,10 @@
               >精准报价</el-button
             >
             <el-button
-              v-if="isAuth('quoted:two')"
+              v-if="isAuth('quoted:notify')"
               type="text"
               size="small"
-              @click="priceHandle(scope.row.priceId,'second')"
+              @click="notifyHandle(scope.row.priceId)"
               >通知报价</el-button
             >
             <el-button
@@ -306,6 +306,7 @@
     <quoted-detail ref="detail" v-if="detailVisible" @onChose="onChose" />
     <quoted-accredit ref="accredit" v-if="accreditVisible" @onChose="onChose"/>
     <quoted-result ref="result" v-if="resultVisible" @onChose="onChose"/>
+    <quoted-notify ref="notify" v-if="notifyVisible" @onChose="onChose"/>
   </div>
 </template>
 
@@ -318,9 +319,10 @@ import QuotedPrice from './quoted-price'
 import QuotedDetail from './quoted-detail'
 import QuotedAccredit from './quoted-accredit'
 import QuotedResult from './quoted-result'
+import QuotedNotify from './quoted-notify'
 export default {
   name: 'cus-quoted',
-  components: { OrgComponent, QuotedAddOrUpdate, QuotedPrice, QuotedDetail, QuotedAccredit, QuotedResult },
+  components: { OrgComponent, QuotedAddOrUpdate, QuotedPrice, QuotedDetail, QuotedAccredit, QuotedResult, QuotedNotify },
   data () {
     return {
       addOrUpdateVisible: false,
@@ -328,6 +330,7 @@ export default {
       priceVisible: false,
       accreditVisible: false,
       resultVisible: false,
+      notifyVisible: false,
       productTypeOption: productTypeOption,
       approveStateOption: approveStateOption,
       projectStateOption: projectStateOption,
@@ -395,6 +398,12 @@ export default {
         this.$refs.price.init(id, type)
       })
     },
+    notifyHandle (id) {
+      this.notifyVisible = true
+      this.$nextTick(() => {
+        this.$refs.notify.init(id)
+      })
+    },
     showDetail (priceId) {
       this.detailVisible = true
       this.$nextTick(() => {

+ 13 - 8
src/views/modules/works/work.vue

@@ -147,7 +147,7 @@
             v-if="isAuth('work:clt:transfer') && Number(scope.row.state) !== 3"
             type="text"
             size="small"
-            @click="transferTask(scope.row.taskId, scope.row.workTypeId)"
+            @click="transferTask(scope.row)"
             >转单</el-button
           >
           <el-button
@@ -242,8 +242,9 @@
           prop="transferUserId"
           label-width="120px"
         >
-          <!--          <user-component v-model="transferDialogForm.transferUserId" :user-id.sync="transferDialogForm.transferUserId"></user-component>-->
+          <user-component v-if="transferDialogForm.taskType === 'routine'" v-model="transferDialogForm.transferUserId" :user-id.sync="transferDialogForm.transferUserId"></user-component>
           <el-select
+            v-else
             v-model="transferDialogForm.transferUserId"
             placeholder="请选择移交用户"
           >
@@ -663,15 +664,19 @@ export default {
         })
     },
     // 移交
-    transferTask (taskId, workTypeId) {
+    transferTask (item) {
+      let {taskId, workTypeId, taskType} = item
       this.transferDialogFormVisible = true
       this.transferDialogForm.taskId = taskId
+      this.transferDialogForm.taskType = taskType
 
-      workTypeMasterList(workTypeId).then(({ data }) => {
-        if (data && data.code === '200') {
-          this.transferUserList = data.data
-        }
-      })
+      if (taskType !== 'routine') {
+        workTypeMasterList(workTypeId).then(({ data }) => {
+          if (data && data.code === '200') {
+            this.transferUserList = data.data
+          }
+        })
+      }
     },
     // 确认移交
     transferSubmit () {