408249787 2 tahun lalu
induk
melakukan
6eaa9832d0

+ 9 - 5
src/views/sb/info/SbInfo.vue

@@ -71,7 +71,7 @@
                       </a-select>
                     </a-form-item>
                   </a-col>
-<!--                  <a-col :md="6" :sm="24">
+                  <!--                  <a-col :md="6" :sm="24">
                     <a-form-item label="自定义类型">
                       <a-select v-model="queryParam.useType" placeholder="请选择">
                         <a-select-option
@@ -179,10 +179,10 @@
                   <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
                     <a-menu-item key="1"><a-icon type="delete" /><a>删除</a></a-menu-item>
                   </a-popconfirm>
-                  <a-popconfirm v-if="measureStatus===1" :visible="false" @visibleChange="batchIncorrect()">
+                  <a-popconfirm v-if="isMeasure===1 || correctType===3" :visible="false" @visibleChange="batchIncorrect()">
                     <a-menu-item key="2"><my-icon type="icon-pandian" /><a>检定</a></a-menu-item>
                   </a-popconfirm>
-                  <a-popconfirm v-if="measureStatus!==1" :visible="false" @visibleChange="batchLocation()">
+                  <a-popconfirm :visible="false" @visibleChange="batchLocation()">
                     <a-menu-item key="3"><my-icon type="icon-pandian" /><a>设备位号</a></a-menu-item>
                   </a-popconfirm>
                 </a-menu>
@@ -221,7 +221,7 @@
                         <a-menu-item key="1">
                           <a v-if="$auth('sb-infos-edit')" @click="handleEdit(record)">修改</a>
                         </a-menu-item>
-                        <a-menu-item key="2" v-if="measureStatus===1" >
+                        <a-menu-item key="2" v-if="isMeasure===1 || correctType===3" >
                           <a @click="batchIncorrect(record)">检定</a>
                         </a-menu-item>
                         <a-menu-item v-if="record.status != 2" key="2">
@@ -321,6 +321,10 @@ export default {
       type: Number,
       default: null
     },
+    correctType: {
+      type: Number,
+      default: 1
+    },
     measureStatus: {
       type: Number,
       default: null
@@ -713,7 +717,7 @@ export default {
       console.log(ids)
       this.visible = false
       const modal = this.$refs.baseModalMeasure
-      modal.base(ids)
+      modal.base(ids, this.correctType)
     },
     handleMeasureBatch () {
       const modal = this.$refs.detailSbMeasureModal

+ 2 - 2
src/views/sb/info/SpecialSbInfo.vue

@@ -1,5 +1,5 @@
 <template>
-  <SbInfo :use-type="5"/>
+  <SbInfo :use-type="5" :correct-type="2" />
 </template>
 
 <script>
@@ -14,4 +14,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 3 - 3
src/views/sb/info/modules/BaseFormMeasure.vue

@@ -209,14 +209,14 @@ export default {
       lastDate[0] = +lastDate[0] + Math.floor((parseInt(lastDate[1]) + parseInt(checkPeriod)) / 12)
       return lastDate.join('-')
     },
-    base (record) {
+    base (record, type) {
       this.visible = true
       this.model = record
       this.ListForm = record.map(item => {
         const data = {
           sbName: item.name,
           sbModel: item.model,
-          checkPeriod: item.checkPeriod,
+          checkPeriod: item.checkPeriod || 0,
           isChild: item.isChild,
           parentSbName: item.parentSbName,
           sbParentId: item.parentId,
@@ -230,7 +230,7 @@ export default {
           remark: '',
           name: this.username,
           sbId: item.id,
-          type: 1,
+          type,
           zzh: item.zzh,
           checkImgList: [],
           checkFileList: []

+ 2 - 2
src/views/store/outstoredetail/OutStoreDetail.vue

@@ -99,10 +99,10 @@ export default {
             return record.storeName
           }
         },
-/*        {
+        /*        {
           title: '备件编号',
           dataIndex: 'spareNo'
-        },*/
+        }, */
         {
           title: '备件名称',
           dataIndex: 'spareId',

+ 15 - 1
src/views/store/outstoreform/OutStoreFormYY.vue

@@ -59,6 +59,8 @@
         <span slot="action" slot-scope="record">
           <template>
             <a @click="handleView(record)">查看</a>
+            <a-divider v-if="record.status == 3 || record.status == 2" type="vertical" />
+            <a v-if="record.status == 3 || record.status == 2" @click="handleViewTicket(record)">打印</a>
             <a-divider v-if="record.status == 0" type="vertical" />
             <a v-if="$auth('store-out-store-forms-edit')&&record.status==0" @click="handleEdit(record)">修改</a>
             <a-divider v-if="record.status==0" type="vertical" />
@@ -69,7 +71,7 @@
             <a-popconfirm v-if="$auth('store-out-store-forms-del')&&record.status==1" title="是否要删除该条数据?" @confirm="batchDelete(record.id)">
               <a>删除</a>
             </a-popconfirm>
-<!--            <a-divider v-if="record.status==2" type="vertical" />
+            <!--            <a-divider v-if="record.status==2" type="vertical" />
             <a-popconfirm v-if="record.status==2" title="是否要撤销?" @confirm="updateStoreBack(record.id)">
               <a>撤销</a>
             </a-popconfirm>-->
@@ -84,6 +86,8 @@
     </div>
     <detail ref="detailModal" @ok="handleOk"/>
     <base-form ref="baseModal" @ok="handleOk"/>
+    <ticket-form ref="ticketForm" @ok="handleOk" />
+
   </a-card>
 </template>
 
@@ -91,6 +95,8 @@
 import { STable, Ellipsis } from '@/components'
 import BaseForm from './modules/BaseFormYY'
 import Detail from './modules/DetailYY'
+import TicketForm from './modules/TicketForm'
+
 import { updateStoreBack, getOutStoreFormPage, deleteOutStoreForms, fetchOutStoreForm, exportOutStoreForm } from '@/api/store/outstoreform'
 import { startOutStoreForm } from '@/api/activiti/activiti-outstoreform'
 
@@ -100,6 +106,7 @@ export default {
     STable,
     Ellipsis,
     BaseForm,
+    TicketForm,
     Detail
   },
   props: {
@@ -240,6 +247,13 @@ export default {
         this.$refs.table.clearSelected()
       })
     },
+    handleViewTicket (record) {
+      this.visible = false
+      fetchOutStoreForm({ id: record.id }).then(res => {
+        const modal = this.$refs.ticketForm
+        modal.base(res.data, this.isOut)
+      })
+    },
     handleView (record) {
       this.visible = false
       fetchOutStoreForm({ id: record.id }).then(res => {

+ 2 - 2
src/views/store/outstoreform/modules/BaseForm.vue

@@ -18,7 +18,7 @@
               v-decorator="['outNo', {rules: [{required: false, message: '出库单号不能为空'}]}]" />
           </a-form-item>
         </a-col>
-<!--        <a-col :lg="12" :md="24" :sm="24">
+        <!--        <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
             label="领用/退货单号"
             :labelCol="BaseTool.Constant.labelCol"
@@ -66,7 +66,7 @@
             </a-select>
           </a-form-item>
         </a-col>
-<!--        <a-col :lg="12" :md="24" :sm="24">
+        <!--        <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
             label="操作人"
             :labelCol="BaseTool.Constant.labelCol"

+ 16 - 1
src/views/store/outstoreform/modules/BaseFormYY.vue

@@ -51,7 +51,7 @@
             </a-tree-select>
           </a-form-item>
         </a-col>-->
-<!--        <a-col :lg="12" :md="24" :sm="24">
+        <!--        <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
             label="出库类型"
             :labelCol="BaseTool.Constant.labelCol"
@@ -131,6 +131,11 @@
           <a-input :value="text" :id="record.cbatch + ',num'" @change="$event => onQuantityChange($event, record.cbatch, 'num')" />
         </div>
       </template>
+      <template slot="remark" slot-scope="text, record">
+        <div>
+          <a-input v-model="record.remark" />
+        </div>
+      </template>
       <span slot="action" slot-scope="record">
         <template>
           <a @click="handleBaseFormForModifySelect(record)">修改</a>
@@ -223,10 +228,20 @@ export default {
           width: 150,
           scopedSlots: { customRender: 'num' }
         },
+        {
+          title: '单位',
+          dataIndex: 'unit'
+        },
         {
           title: '仓库',
           dataIndex: 'storeName'
         },
+        {
+          title: '备注',
+          dataIndex: 'remark',
+          width: 150,
+          scopedSlots: { customRender: 'remark' }
+        },
         {
           title: '操作',
           key: 'action',

+ 167 - 0
src/views/store/outstoreform/modules/TicketForm.vue

@@ -0,0 +1,167 @@
+<template>
+  <div class="main" v-show="visible">
+    <div>
+      <a-button type="primary" v-print="'#print-container2'" :disabled="disabled">打印</a-button>
+      <a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
+    </div>
+    <div id="print-container2">
+      <div class="title">
+        <div style="font-size:26px;"><span style="font-size:30px;font-weight:700;vertical-align: middle;letter-spacing:.2em;">时代思康新材料有限公司</span></div>
+        <div style="font-size:26px;font-weight:700">{{ type? '物资领料单':'物资退库单' }}</div>
+      </div>
+      <div style="display:flex;justify-content:space-between; margin: 10px auto;width: 1030px;">
+        <a-radio-group v-if="type" v-model="value1">
+          <a-radio :value="1">
+            <a-icon class="check" v-show="value1 ==1" type="check" />成品出库
+          </a-radio>
+          <a-radio :value="2">
+            <a-icon class="check" v-show="value1 ==2" type="check" />材料领用出库
+          </a-radio>
+        </a-radio-group>
+        <a-radio-group v-else v-model="value1">
+          <a-radio :value="1">
+            <a-icon class="check" v-show="value1 ==1" type="check" />工程剩余退回
+          </a-radio>
+        </a-radio-group>
+        <div>日期:{{ model.updateTime }}</div>
+      </div>
+      <div class="tables" >
+        <table>
+          <tr>
+            <td colspan="3" style="text-align:left;">
+              {{ type? '领料':'退料' }}单位或个人:{{ model.createdUserName }}
+            </td>
+            <td colspan="3" style="text-align:left;">
+              用途:{{ model.remark }}
+            </td>
+          </tr>
+          <tr>
+            <td colspan="1">物料编码</td>
+            <td colspan="1">物料名称</td>
+            <td colspan="1">规格型号</td>
+            <td colspan="1">单位</td>
+            <td colspan="1">数量</td>
+            <td colspan="1">备注</td>
+          </tr>
+          <tr v-for="item in model.detailList" :key="item.outId">
+            <td colspan="1">{{ item.spareId }}</td>
+            <td colspan="1">{{ item.spareName }}</td>
+            <td colspan="1">{{ item.ggxh }}</td>
+            <td colspan="1">{{ item.unit }}</td>
+            <td colspan="1">{{ item.num }}</td>
+            <td colspan="1">{{ item.remark }}</td>
+          </tr>
+          <tr v-if="model.detailList.length<6" v-for="i in (6-model.detailList.length)" :key="i">
+            <td></td>
+            <td></td>
+            <td></td>
+            <td></td>
+            <td></td>
+            <td></td>
+          </tr>
+          <tr>
+            <td colspan="2">合计</td>
+            <td colspan="1"></td>
+            <td colspan="1"></td>
+            <td colspan="1">{{ model.detailList.reduce((num,item)=>num+=item.num,0) }}</td>
+            <td colspan="1"></td>
+          </tr>
+        </table>
+      </div>
+      <div style="display:flex;justify-content:space-between ; margin: 10px auto;width: 1030px;">
+        <div >{{ type? '领料':'退料' }}人:{{ model.createdUserName }}</div>
+        <div>部门主管:{{ model.updateUserName }}</div>
+        <div style="width: 150px;">仓管:</div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      visible: false,
+      disabled: false,
+      value1: 1,
+      type: true,
+      model: {
+        'repairNo': null,
+        'callTime': null,
+        'sbNo': null,
+        'sbName': null,
+        'sbLocation': null,
+        'caller': null,
+        'dispatcher': null,
+        'repairMan': null,
+        'content': null
+      }
+    }
+  },
+  methods: {
+    base (record, type) {
+      this.visible = true
+      console.log(record)
+      this.type = type
+      this.model = record
+    },
+    handleCancel (values) {
+      this.visible = false
+      this.$emit('ok')
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.main{
+  background: #fff;
+}
+.title{
+  text-align: center;
+  font-size:18px;
+}
+.tables{
+  margin: 10px auto;
+   width: 1030px;
+  font-size: 14px;
+  overflow-x:auto;
+  table {
+        min-width:100%;
+        margin: 0 auto;
+        border: 1px solid #D6D6D6;
+        border-radius: 6px;
+        border-collapse: collapse;
+        font-weight: 400;
+        table-layout:fixed;
+    }
+    th{
+      color: #FFFFFF;
+      background: #3762FC;
+    }
+    tr {
+      height:26px;
+    }
+    th,
+    td {
+        border: 1px solid #D6D6D6;
+        text-align: center;
+        padding: 2px 10px;
+        white-space: nowrap;
+    }
+}
+.check{
+  position:absolute;
+  left:0px;
+  font-size:20px;
+}
+.checks{
+  position:absolute;
+  left:-27px;
+  font-size:20px;
+}
+/deep/.ant-radio-inner::after ,/deep/.ant-checkbox-checked .ant-checkbox-inner{
+  background-color:#fff;
+  border-radius: 0;
+}
+</style>