فهرست منبع

发货详情(生产详情查看)

liqianyi 3 سال پیش
والد
کامیت
4ff47f1052

+ 17 - 0
src/api/sale.js

@@ -60,6 +60,14 @@ export function getDeliverDetail (id) {
   })
 }
 
+// 生产详情
+export function getProductionDetail (id) {
+  return request({
+    url: request.adornUrl(`/biz-service/deliver/infoQuery/${id}`),
+    method: 'get'
+  })
+}
+
 // 订单发货
 export function deliverOrder (data) {
   return request({
@@ -111,3 +119,12 @@ export function getOutsourceDetail (id) {
     method: 'get'
   })
 }
+
+// 供应商列表
+export function getSupplierList (params) {
+  return request({
+    url: request.adornUrl(`/biz-service/supplier/list`),
+    method: 'get',
+    params: params
+  })
+}

+ 54 - 24
src/views/modules/order/dispatch-detail.vue

@@ -1,8 +1,24 @@
 <template>
   <div>
     <div class="my-title">查看</div>
-    <div style="margin-left: 20px;margin-right: 20px">
-    </div>
+    <el-form
+      :model="dataForm"
+      :rules="dataRule"
+      ref="dataForm"
+      label-width="auto"
+    >
+      <el-row
+        class="my-row"
+        style="height: 350px; background-color: #efefef;"
+      >
+        <work-flow
+          ref="workFlow"
+          :nodeData="workFlowData"
+          :selectOperator="true"
+          :disabled="true"
+        ></work-flow>
+      </el-row>
+    </el-form>
     <span slot="footer" class="dialog-footer">
       <el-button @click="onChose">返回</el-button>
     </span>
@@ -10,33 +26,47 @@
 </template>
 
 <script>
-  import { getDeliverDetail } from '@/api/sale'
-  export default {
-    name: 'dispatch-detail',
-    data () {
-      return {
-        dataForm: {},
-        id: 0
+import WorkFlow from '@/components/work-flow/home'
+import { getProductionDetail } from '@/api/sale'
+export default {
+  name: 'dispatch-detail',
+  components: {
+    WorkFlow
+  },
+  data () {
+    return {
+      dataForm: {},
+      id: 0,
+      dataRule: {},
+      workFlowData: {
+        nodeList: [],
+        lineList: []
       }
+    }
+  },
+  methods: {
+    onChose () {
+      this.$emit('onChose')
+    },
+    async init (id) {
+      this.id = id || 0
+      this.dataForm = {}
+      this.getDetails()
     },
-    methods: {
-      onChose () {
-        this.$emit('onChose')
-      },
-      async init (id) {
-        this.id = id || 0
-        this.dataForm = {}
-        this.getDetails()
-      },
-      getDetails () {
-        getDeliverDetail(this.id).then(({data}) => {
-          if (data && data.code === '200') {
-            this.dataForm = data.data
+    getDetails () {
+      getProductionDetail(this.id).then(({data}) => {
+        if (data && data.code === '200' && data.data) {
+          this.dataForm = { ...this.dataForm }
+          // 流程图展示
+          this.workFlowData = {
+            nodeList: data.data.nodeList,
+            lineList: data.data.lineList
           }
-        })
-      }
+        }
+      })
     }
   }
+}
 </script>
 
 <style scoped>

+ 0 - 8
src/views/modules/production/recording-details.vue

@@ -1,12 +1,5 @@
 <template>
   <div class="production">
-    <!-- <el-dialog
-      title="生产记录详情"
-      width="70%"
-      :close-on-click-modal="false"
-      :visible.sync="visible"
-      @close="handleClose"
-    > -->
       <div class="my-title">生产记录详情</div>
       <el-form
         :model="dataForm"
@@ -29,7 +22,6 @@
       <span slot="footer" class="dialog-footer">
         <el-button @click="onChose">取消</el-button>
       </span>
-    <!-- </el-dialog> -->
   </div>
 </template>
 

+ 254 - 0
src/views/modules/sale/supplier.vue

@@ -0,0 +1,254 @@
+<!-- 供应商管理 -->
+<template>
+  <div class="purchase">
+    <template v-if="!addOrUpdateVisible && !detailVisible && !attachVisible">
+      <el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
+        <el-form-item label="供应商名称">
+          <el-input v-model="dataForm.supplierName" placeholder="供应商名称" clearable/>
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-select
+            v-model="dataForm.supplierState"
+            remote
+            placeholder="请选择">
+            <el-option
+              v-for="item in optionsSupplierState"
+              :key="item.code"
+              :label="item.value"
+              :value="item.code">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button @click="search()">查询</el-button>
+          <el-button v-if="isAuth('sale:supplier:save')" type="primary" @click="addOrUpdateHandle(0)">录入</el-button>
+        </el-form-item>
+      </el-form>
+      <el-table
+        :data="dataList"
+        border
+        v-loading="dataListLoading"
+        style="width: 100%;">
+        <el-table-column
+          label="序号"
+          type="index"
+          width="50"
+          align="center">
+        </el-table-column>
+        <el-table-column
+          prop="supplierName"
+          header-align="center"
+          align="center"
+          width="140"
+          :show-tooltip-when-overflow="true"
+          label="供应商名称">
+        </el-table-column>
+        <el-table-column
+          prop="level"
+          header-align="center"
+          align="center"
+          label="级别">
+        </el-table-column>
+        <el-table-column
+          prop="contact"
+          header-align="center"
+          align="center"
+          width="100"
+          :show-tooltip-when-overflow="true"
+          label="联系人">
+        </el-table-column>
+        <el-table-column
+          prop="tel"
+          header-align="center"
+          align="center"
+          min-width="100"
+          :show-tooltip-when-overflow="true"
+          label="电话">
+        </el-table-column>
+        <el-table-column
+          prop="addressWork"
+          header-align="center"
+          align="center"
+          min-width="140"
+          :show-tooltip-when-overflow="true"
+          label="地址">
+        </el-table-column>
+        <el-table-column
+          prop="state"
+          header-align="center"
+          align="center"
+          :formatter="formatState"
+          label="状态">
+        </el-table-column>
+        <el-table-column
+          header-align="center"
+          align="center"
+          label="附件">
+          <template slot-scope="scope">
+            <el-button :disabled="!scope.row.attachList || scope.row.attachList.length === 0" type="text" size="small" @click="attachDetails(scope.row)">查看</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="notes"
+          header-align="center"
+          align="center"
+          min-width="180"
+          :show-overflow-tooltip="true"
+          label="备注">
+        </el-table-column>
+        <el-table-column
+          fixed="right"
+          header-align="center"
+          align="center"
+          width="150"
+          label="操作">
+          <template slot-scope="scope">
+            <el-button v-if="isAuth('sale:supplier:info')" type="text" size="small" @click="detailHandle(scope.row.supplierId)">查看</el-button>
+            <el-button v-if="isAuth('sale:supplier:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.supplierId)">编辑</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        @size-change="sizeChangeHandle"
+        @current-change="currentChangeHandle"
+        :current-page="pageIndex"
+        :page-sizes="[10, 20, 50, 100]"
+        :page-size="pageSize"
+        :total="totalPage"
+        layout="total, sizes, prev, pager, next, jumper">
+      </el-pagination>
+    </template>
+    <!-- 弹窗, 新增 / 修改 -->
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @onChose="onChose"></add-or-update>
+    <detail v-if="detailVisible" ref="detail" @onChose="onChose"/>
+    <attach-detail v-if="attachVisible" ref="attachDetail" @onChose="onChose"/>
+  </div>
+</template>
+
+<script>
+  import AddOrUpdate from './purchase-add-or-update'
+  import Detail from './purchase-detail'
+  import { getSupplierList } from '@/api/sale'
+  import AttachDetail from '../common/attach-detail'
+export default {
+    name: 'supplier',
+    components: {
+      AttachDetail,
+      AddOrUpdate,
+      Detail
+    },
+    data () {
+      return {
+        dataForm: {},
+        dataList: [],
+        pageIndex: 1,
+        pageSize: 10,
+        totalPage: 0,
+        dataListLoading: false,
+        dataListSelections: [],
+        addOrUpdateVisible: false,
+        detailVisible: false,
+        attachVisible: false,
+        optionsSupplierState: [ // 供应商状态
+          {
+            code: '1', value: '正常'
+          },
+          {
+            code: '2', value: '待考核'
+          }
+        ],
+        optionsState: [] // 审批状态
+      }
+    },
+    created () {
+      this.optionsState = this.$store.state.common.approveStates
+      this.getDataList()
+    },
+    methods: {
+      onChose () {
+        this.addOrUpdateVisible = false
+        this.detailVisible = false
+        this.attachVisible = false
+      },
+      // 查询
+      search () {
+        this.pageIndex = 1
+        this.getDataList()
+      },
+      // 获取数据列表
+      getDataList () {
+        this.dataListLoading = true
+        this.addOrUpdateVisible = false
+        let params = {
+          'current': this.pageIndex,
+          'size': this.pageSize,
+          'supplierName': this.dataForm.supplierName ? this.dataForm.supplierName : null,
+          'supplierState': this.dataForm.supplierState ? this.dataForm.supplierState : null
+        }
+        getSupplierList(params).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataList = data.data.records
+            this.totalPage = Number(data.data.total)
+          } else {
+            this.dataList = []
+            this.totalPage = 0
+          }
+          this.dataListLoading = false
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.pageSize = val
+        this.pageIndex = 1
+        this.getDataList()
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.pageIndex = val
+        this.getDataList()
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+      },
+      // 新增 / 修改
+      addOrUpdateHandle (id, disable) {
+        this.addOrUpdateVisible = true
+        this.$nextTick(() => {
+          this.$refs.addOrUpdate.init(id, disable)
+        })
+      },
+      // 转换属性“类别”
+      formatType (row) {
+        if (this.optionsType && row.purchaseType) {
+          const item1 = this.optionsType.find((item) => item.code === row.purchaseType.toString())
+          return item1 ? item1.value : ''
+        }
+      },
+      // 转换属性“是否组合产品”
+      formatState (row) {
+        if (!row.state) return ''
+        const item1 = this.optionsSupplierState.find((item) => item.code === row.state.toString())
+        return item1 ? item1.value : ''
+      },
+      // 详情
+      detailHandle (id) {
+        this.detailVisible = true
+        this.$nextTick(() => {
+          this.$refs.detail.init(id)
+        })
+      },
+      // 附件
+      attachDetails (row) {
+        this.attachVisible = true
+        this.$nextTick(() => {
+          this.$refs.attachDetail.init(row.attachList)
+        })
+      }
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>