costAllocationDrawer.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <template>
  2. <!-- 成本分配详情-->
  3. <div id="costAllocationDrawer">
  4. <a-drawer
  5. title="详情"
  6. width="89%"
  7. placement="right"
  8. :closable="true"
  9. :visible="visible"
  10. @close="onClose"
  11. >
  12. <!-- 主表信息 -->
  13. <a-card :bordered="false">
  14. <div class="table-page-search-wrapper">
  15. <a-form layout="inline">
  16. <a-row :gutter="24">
  17. <a-col :md="6" :sm="8">
  18. <a-form-item label="计划单号">
  19. <a-input v-model="costAllocation.planNum"></a-input>
  20. </a-form-item>
  21. </a-col>
  22. <a-col :md="6" :sm="8">
  23. <a-form-item label="产品款号" has-feedback>
  24. <a-input v-model="costAllocation.poStyleNum"></a-input>
  25. </a-form-item>
  26. </a-col>
  27. <a-col :md="6" :sm="8">
  28. <a-form-item label="外销员">
  29. <a-input v-model="costAllocation.exportSales"></a-input>
  30. </a-form-item>
  31. </a-col>
  32. <a-col :md="6" :sm="8">
  33. <a-form-item label="成衣合同号">
  34. <a-input v-model="costAllocation.garmentContractNo"></a-input>
  35. </a-form-item>
  36. </a-col>
  37. <a-col :md="6" :sm="8">
  38. <a-form-item label="部门">
  39. <a-input v-model="costAllocation.department"></a-input>
  40. </a-form-item>
  41. </a-col>
  42. <a-col :md="6" :sm="8">
  43. <a-form-item label="客户简称">
  44. <a-input v-model="costAllocation.customerShortName"></a-input>
  45. </a-form-item>
  46. </a-col>
  47. <a-col :md="6" :sm="8">
  48. <a-form-item label="加工单位">
  49. <a-input v-model="costAllocation.processUnit"></a-input>
  50. </a-form-item>
  51. </a-col>
  52. <a-col :md="6" :sm="8">
  53. <a-form-item label="出运日期">
  54. <a-date-picker style="width: 100%" v-model="costAllocation.outData"></a-date-picker>
  55. </a-form-item>
  56. </a-col>
  57. <a-col :md="6" :sm="8">
  58. <a-form-item label="计划数量">
  59. <a-input v-model="costAllocation.planQuantity"></a-input>
  60. </a-form-item>
  61. </a-col>
  62. <a-col :md="6" :sm="8">
  63. <a-form-item label="美元外销总价">
  64. <a-input v-model="costAllocation.USDTotalExportPrice"></a-input>
  65. </a-form-item>
  66. </a-col>
  67. <a-col :md="6" :sm="8">
  68. <a-form-item label="人民币费用支出">
  69. <a-input
  70. v-model="costAllocation.RMBExpense"
  71. style="color:#027db4;"
  72. @click="mainTableExpenseCNY"
  73. ></a-input>
  74. </a-form-item>
  75. </a-col>
  76. <a-col :md="6" :sm="8">
  77. <a-form-item label="税率%">
  78. <a-input v-model="costAllocation.taxRate"></a-input>
  79. </a-form-item>
  80. </a-col>
  81. <a-col :md="6" :sm="8">
  82. <a-form-item label="实际出货数量">
  83. <a-input v-model="costAllocation.actualShipQuantity"></a-input>
  84. </a-form-item>
  85. </a-col>
  86. <a-col :md="6" :sm="8">
  87. <a-form-item label="人民币外销金额">
  88. <a-input v-model="costAllocation.RMBExportAmount"></a-input>
  89. </a-form-item>
  90. </a-col>
  91. <a-col :md="6" :sm="8">
  92. <a-form-item label="美元费用支出">
  93. <a-input
  94. v-model="costAllocation.USDExpense"
  95. style="color:#027db4;"
  96. @click="mainTableExpenseUSD"
  97. ></a-input>
  98. </a-form-item>
  99. </a-col>
  100. <a-col :md="6" :sm="8">
  101. <a-form-item label="加工费">
  102. <a-input v-model="costAllocation.processCost"></a-input>
  103. </a-form-item>
  104. </a-col>
  105. <a-col :md="6" :sm="8">
  106. <a-form-item label="短出数">
  107. <a-input v-model="costAllocation.shortSeveral"></a-input>
  108. </a-form-item>
  109. </a-col>
  110. <a-col :md="6" :sm="8">
  111. <a-form-item label="短出货值">
  112. <a-input v-model="costAllocation.shortValue"></a-input>
  113. </a-form-item>
  114. </a-col>
  115. <a-col :md="6" :sm="8">
  116. <a-form-item label="短出面料成本">
  117. <a-input v-model="costAllocation.fabricShortCost"></a-input>
  118. </a-form-item>
  119. </a-col>
  120. <a-col :md="6" :sm="8">
  121. <a-form-item label="事故单美金金额">
  122. <a-input v-model="costAllocation.accidentUSDAmount"></a-input>
  123. </a-form-item>
  124. </a-col>
  125. <a-col :md="6" :sm="8">
  126. <a-form-item label="面料含税成本">
  127. <a-input v-model="costAllocation.fabricCostIncludesTax"></a-input>
  128. </a-form-item>
  129. </a-col>
  130. <a-col :md="6" :sm="8">
  131. <a-form-item label="辅料含税成本">
  132. <a-input v-model="costAllocation.excipienCostIncludesTax"></a-input>
  133. </a-form-item>
  134. </a-col>
  135. <a-col :md="6" :sm="8">
  136. <a-form-item label="销售订单本币总额">
  137. <a-input v-model="costAllocation.salesOrdersLocalTotal"></a-input>
  138. </a-form-item>
  139. </a-col>
  140. <a-col :md="6" :sm="8">
  141. <a-form-item label="事故单人民币金额">
  142. <a-input v-model="costAllocation.accidentCNYAmount"></a-input>
  143. </a-form-item>
  144. </a-col>
  145. <a-col :md="6" :sm="8">
  146. <a-form-item label="面料不含税成本">
  147. <a-input v-model="costAllocation.fabricCostNotIncludesTax"></a-input>
  148. </a-form-item>
  149. </a-col>
  150. <a-col :md="6" :sm="8">
  151. <a-form-item label="辅料不含税成本">
  152. <a-input v-model="costAllocation.excipienCostNotIncludesTax"></a-input>
  153. </a-form-item>
  154. </a-col>
  155. <a-col :md="6" :sm="8">
  156. <a-form-item label="销售订单原币总额">
  157. <a-input v-model="costAllocation.salesOrdersOriginalTotal"></a-input>
  158. </a-form-item>
  159. </a-col>
  160. <a-col :md="6" :sm="8">
  161. <a-form-item label="制单人">
  162. <a-input v-model="costAllocation.preparedBy"></a-input>
  163. </a-form-item>
  164. </a-col>
  165. <a-col :md="6" :sm="8">
  166. <h4 style="color:red;">
  167. 标记
  168. <span>(计算结果是负值时,该标记是红色)</span>
  169. </h4>
  170. </a-col>
  171. </a-row>
  172. </a-form>
  173. </div>
  174. </a-card>
  175. <!-- 子表 -->
  176. <a-card :bordered="false">
  177. <!--tabs 组件引入 -->
  178. <div style="marginTop:60px;">
  179. <tabs />
  180. </div>
  181. <!-- 事故单 -->
  182. <div style="margin:60px 0 40px 0">
  183. <h6 class="table-title">事故单</h6>
  184. <a-table
  185. rowKey="id"
  186. :loading="loading"
  187. :columns="accidentListColumns"
  188. :data-source="accidentListData"
  189. bordered
  190. :pagination="false"
  191. >
  192. <!-- 事故单 -->
  193. <span slot="accidentNum" slot-scope="text">
  194. <a>{{ text }}</a>
  195. </span>
  196. </a-table>
  197. </div>
  198. <!-- 费用支出 -->
  199. <div>
  200. <h6 class="table-title">费用支出</h6>
  201. <a-table
  202. rowKey="id"
  203. :loading="loading"
  204. :columns="costPayColumns"
  205. :data-source="costPayData"
  206. bordered
  207. :pagination="false"
  208. >
  209. </a-table>
  210. </div>
  211. <!-- 备注信息 1 根据角色权限控制【填写】、【查看】-->
  212. <div class="note-one" style="marginTop:40px;">
  213. <h6 class="table-title">备注信息 1</h6>
  214. <div class="noteDetail">
  215. <a-input type="textarea" v-model="noteOne" placeholder="请输入备注 1" style="minHeight:100px;" />
  216. <a-button type="primary" @click="savenoteOne">保存</a-button>
  217. </div>
  218. </div>
  219. <!-- 备注信息 2 根据角色权限控制【填写】、【查看】-->
  220. <div class="note-two" style="marginTop:40px;">
  221. <h6 class="table-title">备注信息 2</h6>
  222. <div class="noteDetail">
  223. <a-input type="textarea" v-model="noteTwo" placeholder="请输入备注 2" style="minHeight:100px;" />
  224. <a-button type="primary" @click="savenoteTwo">保存</a-button>
  225. </div>
  226. </div>
  227. </a-card>
  228. </a-drawer>
  229. <!-- 所有弹框 -->
  230. <div>
  231. <!-- 主表 人民币费用支出 弹框 -->
  232. <mainTableExpenseCNY-modal ref="mainTableExpenseCNYModal" :father="aa"></mainTableExpenseCNY-modal>
  233. <!-- 主表 美元费用支出 弹框 -->
  234. <mainTableExpenseUSD-modal ref="mainTableExpenseUSDModal" :father="bb"></mainTableExpenseUSD-modal>
  235. <!-- 事故单 -->
  236. <accidentList-modal ref="accidentListModal" :father="cc"></accidentList-modal>
  237. </div>
  238. </div>
  239. </template>
  240. <script>
  241. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  242. import JEllipsis from '@/components/jeecg/JEllipsis'
  243. import moment from 'moment'
  244. import tabs from '@views/reportForms/cost-allocation-table/tabs.vue' // tabs组件
  245. import mainTableExpenseCNYModal from '@views/reportForms/cost-allocation-table/mainTableExpenseCNYModal.vue'
  246. import mainTableExpenseUSDModal from '@views/reportForms/cost-allocation-table/mainTableExpenseUSDModal.vue'
  247. import accidentListModal from '@views/reportForms/fabric-loss-table/accidentListModal.vue' // 事故单
  248. export default {
  249. name: 'CostAllocationTable', // 成本分配统计表
  250. mixins: [JeecgListMixin],
  251. components: { JEllipsis, moment, tabs, mainTableExpenseCNYModal, mainTableExpenseUSDModal, accidentListModal },
  252. data() {
  253. return {
  254. description: '成本分配统计表详情 ',
  255. loading: false, // 表格加载
  256. costAllocation: [], // 成本分配统计
  257. noteOne: '', // 备注 1
  258. noteTwo: '', // 备注 2
  259. // 事故单 表头
  260. accidentListColumns: [
  261. {
  262. title: '单号',
  263. width: 120,
  264. dataIndex: 'accidentNum',
  265. className: 'replacecolor',
  266. customCell: this.accidentListCustomCell,
  267. scopedSlots: { customRender: 'accidentNum' }
  268. },
  269. { title: '事故承担方', width: 120, dataIndex: 'accidentUndertaker', className: 'replacecolor' },
  270. { title: '金额', dataIndex: 'amount', width: 120, className: 'replacecolor' }
  271. ],
  272. accidentListData: [{ accidentNum: '1100011' }, {}],
  273. // 费用支出 表头
  274. costPayColumns: [
  275. { title: '账套号', width: 120, dataIndex: 'setNo', className: 'replacecolor' },
  276. { title: '支出单号', width: 120, dataIndex: 'disbursementSlipNo', className: 'replacecolor' },
  277. { title: '费用项目', dataIndex: 'expenseItem', width: 120, className: 'replacecolor' },
  278. { title: ' 支出本币金额', dataIndex: 'disbursedLocalMoney', width: 120, className: 'replacecolor' },
  279. { title: '支出原币金额', dataIndex: 'disbursedOriginalMoney', width: 120, className: 'replacecolor' },
  280. { title: '发票号', dataIndex: 'invoiceNum', width: 120, className: 'replacecolor' },
  281. { title: '制单人', dataIndex: 'preparedBy', width: 120, className: 'replacecolor' }
  282. ],
  283. costPayData: [{}],
  284. visible: false // 成本分配统计表详情 抽屉
  285. }
  286. },
  287. created() {},
  288. methods: {
  289. // 同步按钮 synchronization() {},
  290. // 主表:人民币费用支出 弹框
  291. mainTableExpenseCNY() {
  292. console.log('点击:主表人民币费用支出')
  293. this.$refs.mainTableExpenseCNYModal.mainTableExpenseCNYModVis = true
  294. },
  295. // 主表:美元费用支出 弹框
  296. mainTableExpenseUSD() {
  297. console.log('点击:主表美元费用支出')
  298. this.$refs.mainTableExpenseUSDModal.mainTableExpenseUSDModVis = true
  299. },
  300. // 事故单 单号 弹框
  301. accidentListCustomCell(record) {
  302. return {
  303. on: {
  304. click: event => {
  305. console.log('this:', this)
  306. // 调用【面料损耗表】中的【事故单】弹框
  307. this.$refs.accidentListModal.accidentListModVis = true
  308. }
  309. }
  310. }
  311. },
  312. // ---------------------------------------
  313. // 保存备注 1
  314. savenoteOne() {
  315. console.log('保存 备注 1')
  316. },
  317. // 保存备注 2
  318. savenoteTwo() {
  319. console.log('保存 备注 2')
  320. },
  321. onClose() {
  322. // 关闭抽屉
  323. this.visible = false
  324. },
  325. // --------------------------------------------------
  326. // father 方法
  327. aa() {},
  328. bb() {},
  329. cc() {}
  330. },
  331. computed: {},
  332. mounted() {}
  333. }
  334. </script>
  335. <style lang="less" scoped>
  336. @import '~@assets/less/common.less';
  337. @import '~@assets/less/overwriter.less';
  338. /deep/ .ant-table-thead > tr > th {
  339. text-align: center;
  340. // font-weight: 700;
  341. }
  342. /deep/ .ant-table-tbody {
  343. text-align: center;
  344. }
  345. // /deep/ th.replacecolor {
  346. // background-color: #ccc;
  347. // }
  348. /deep/ .ant-card-body {
  349. padding: 0;
  350. }
  351. /deep/ .ant-tabs {
  352. border: 6px solid rgba(24, 144, 255,.3);
  353. padding: 12px;
  354. border-radius: 12px;
  355. }
  356. </style>