TicketForm.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <div class="main" v-show="visible">
  3. <div>
  4. <a-button type="primary" v-print="'#print-container2'" :disabled="disabled">打印</a-button>
  5. <a-button style="margin-left: 8px" @click="handleCancel()">返回</a-button>
  6. </div>
  7. <div id="print-container2">
  8. <div class="title">
  9. <div style="font-size:26px;"><span style="font-size:30px;font-weight:700;vertical-align: middle;letter-spacing:.2em;">时代思康新材料有限公司</span></div>
  10. <div style="font-size:26px;font-weight:700">{{ BaseTool.Object.getField(typeMap,model.type) }}</div>
  11. </div>
  12. <div style="display:flex;justify-content:space-between; margin: 10px auto;width: 1030px;">
  13. <a-radio-group name="radioGroup" v-model="value1">
  14. <a-radio :value="1">
  15. <a-icon class="check" v-show="value1 ==1" type="check" />
  16. 能源装备部
  17. </a-radio>
  18. <a-radio :value="2">
  19. <a-icon class="check" v-show="value1 ==2" type="check" />
  20. 生产部
  21. </a-radio>
  22. <a-radio :value="3">
  23. <a-icon class="check" v-show="value1 ==3" type="check" />
  24. 筹建部
  25. </a-radio>
  26. </a-radio-group>
  27. <div>单号:{{ model.yyId }}</div>
  28. <div>日期:{{ model.userTime }}</div>
  29. </div>
  30. <div class="tables" >
  31. <table>
  32. <tr>
  33. <td colspan="1" style="text-align:left;">
  34. {{ type? '领库':'退库' }}单位或个人:{{ model.createdUserName }}
  35. </td>
  36. <td colspan="3" style="text-align:left;">
  37. 用途:{{ model.remark }}
  38. </td>
  39. <td colspan="2" style="text-align:left;">
  40. 成本归属:{{ model.remark }}
  41. </td>
  42. </tr>
  43. <tr>
  44. <td colspan="1">物料编码</td>
  45. <td colspan="1">物料名称</td>
  46. <td colspan="1">规格型号</td>
  47. <td colspan="1">单位</td>
  48. <td colspan="1">数量</td>
  49. <td colspan="1">备注</td>
  50. </tr>
  51. <tr v-for="item in model.detailList" :key="item.outId">
  52. <td colspan="1">{{ item.no }}</td>
  53. <td colspan="1">{{ item.spareName }}</td>
  54. <td colspan="1">{{ item.ggxh }}</td>
  55. <td colspan="1">{{ item.unit }}</td>
  56. <td colspan="1">{{ item.num }}</td>
  57. <td colspan="1">{{ item.remark }}</td>
  58. </tr>
  59. <tr v-if="model.detailList.length<6" v-for="i in (6-model.detailList.length)" :key="i">
  60. <td></td>
  61. <td></td>
  62. <td></td>
  63. <td></td>
  64. <td></td>
  65. <td></td>
  66. </tr>
  67. <tr>
  68. <td colspan="2">合计</td>
  69. <td colspan="1"></td>
  70. <td colspan="1"></td>
  71. <td colspan="1">{{ model.detailList.reduce((num,item)=>num+=item.num,0) }}</td>
  72. <td colspan="1"></td>
  73. </tr>
  74. </table>
  75. </div>
  76. <div style="display:flex;justify-content:space-between ; margin: 10px auto;width: 1030px;">
  77. <div >{{ type? '领库':'退库' }}人:{{ model.createdUserName }}</div>
  78. <div>部门主管:{{ model.applyUserName }}</div>
  79. <div style="width: 150px;">仓管:</div>
  80. </div>
  81. </div>
  82. </div>
  83. </template>
  84. <script>
  85. export default {
  86. data () {
  87. return {
  88. visible: false,
  89. disabled: false,
  90. value1: 1,
  91. type: true,
  92. typeMap: {},
  93. model: {
  94. 'yyId': null,
  95. 'userTime': null,
  96. 'type': null,
  97. 'sbNo': null,
  98. 'sbName': null,
  99. 'sbLocation': null,
  100. 'caller': null,
  101. 'dispatcher': null,
  102. 'repairMan': null,
  103. 'content': null
  104. }
  105. }
  106. },
  107. created () {
  108. // 下拉框map
  109. // this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
  110. },
  111. methods: {
  112. base (record, type) {
  113. this.visible = true
  114. console.log(record)
  115. this.type = type
  116. this.model = record
  117. if (record.outFlag === 1) {
  118. this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.OUT_STORE_FORM_TYPE)
  119. } else {
  120. this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SPARE_BACK_FORM_TYPE)
  121. }
  122. },
  123. handleCancel (values) {
  124. this.visible = false
  125. this.$emit('ok')
  126. }
  127. }
  128. }
  129. </script>
  130. <style lang="less" scoped>
  131. .main{
  132. background: #fff;
  133. }
  134. .title{
  135. text-align: center;
  136. font-size:18px;
  137. }
  138. .tables{
  139. margin: 10px auto;
  140. width: 1030px;
  141. font-size: 14px;
  142. overflow-x:auto;
  143. table {
  144. min-width:100%;
  145. margin: 0 auto;
  146. border: 1px solid #D6D6D6;
  147. border-radius: 6px;
  148. border-collapse: collapse;
  149. font-weight: 400;
  150. table-layout:fixed;
  151. }
  152. th{
  153. color: #FFFFFF;
  154. background: #3762FC;
  155. }
  156. tr {
  157. height:26px;
  158. }
  159. th,
  160. td {
  161. border: 1px solid #D6D6D6;
  162. text-align: center;
  163. padding: 2px 10px;
  164. white-space: nowrap;
  165. }
  166. }
  167. .check{
  168. position:absolute;
  169. left:0px;
  170. font-size:20px;
  171. }
  172. .checks{
  173. position:absolute;
  174. left:-27px;
  175. font-size:20px;
  176. }
  177. /deep/.ant-radio-inner::after ,/deep/.ant-checkbox-checked .ant-checkbox-inner{
  178. background-color:#fff;
  179. border-radius: 0;
  180. }
  181. </style>