cost-allocation-table.vue 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021
  1. <template>
  2. <!--报表 成本分配表 (保存后数据到单证的成本分配汇总内)-->
  3. <div id="costAllocationTable">
  4. <a-card :bordered="false">
  5. <!-- 主表信息 点击搜索后 回显--->
  6. <a-row :gutter="24">
  7. <div class="table-page-search-wrapper">
  8. <!-- ref="form" :model="costAllocationTable" -->
  9. <a-form-model layout="inline" class="kk">
  10. <a-col :md="6" :sm="8">
  11. <a-form-model-item label="计划单号" prop="plannum">
  12. <a-input-search
  13. placeholder="请输入计划单号"
  14. enter-button
  15. v-model="detailsPlanNum.planNum"
  16. @search="onSearch('query')"
  17. :loading="this.loading"
  18. v-show='showSelect==0'
  19. />
  20. <a-input-search
  21. placeholder="请输入计划单号"
  22. v-text="detailsPlanNum.planNum"
  23. enter-button
  24. @search="onSearch('query')"
  25. v-show='showSelect==1'
  26. />
  27. <a-button type="primary" :disabled="edit == '0'" @click="onSearch('queryNew')" class="noprint">更新</a-button>
  28. </a-form-model-item>
  29. </a-col>
  30. <!-- 回显以下【备注】需要输入,后进行保存 disabled -->
  31. <a-col :md="6" :sm="8">
  32. <a-form-model-item label="产品款号" prop="poStyleNum">
  33. <span :title=" detailsPlanNum.poStyleNum">{{ detailsPlanNum.poStyleNum | ellipsis}}</span>
  34. <!-- {{ detailsPlanNum.poStyleNum }} -->
  35. </a-form-model-item>
  36. </a-col>
  37. <a-col :md="6" :sm="8">
  38. <a-form-model-item label="外销员" prop="exportSales">
  39. {{ detailsPlanNum.exportSales }}
  40. </a-form-model-item>
  41. </a-col>
  42. <a-col :md="6" :sm="8">
  43. <a-form-model-item label="成衣合同号" prop="garmentContractno">
  44. {{ detailsPlanNum.garmentContractno }}
  45. </a-form-model-item>
  46. </a-col>
  47. <a-col :md="6" :sm="8">
  48. <a-form-model-item label="部门" prop="department">
  49. {{ detailsPlanNum.department }}
  50. </a-form-model-item>
  51. </a-col>
  52. <a-col :md="6" :sm="8">
  53. <a-form-model-item label="客户简称" prop="customerShortame">
  54. {{ detailsPlanNum.customerShortame }}
  55. </a-form-model-item>
  56. </a-col>
  57. <a-col :md="6" :sm="8">
  58. <a-form-model-item label="加工单位" prop="processUnit">
  59. <span :title=" detailsPlanNum.processUnit">{{ detailsPlanNum.processUnit | ellipsis}}</span>
  60. <!-- {{ detailsPlanNum.processUnit }} -->
  61. </a-form-model-item>
  62. </a-col>
  63. <a-col :md="6" :sm="8">
  64. <a-form-model-item label="出运日期" prop="outdata">
  65. {{ detailsPlanNum.outdata }}
  66. </a-form-model-item>
  67. </a-col>
  68. <a-col :md="6" :sm="8">
  69. <a-form-model-item label="面料不含税成本(¥)" prop="fabriccostNotincludestax" >
  70. {{ detailsPlanNum.fabriccostNotincludestax }}
  71. </a-form-model-item>
  72. </a-col>
  73. <a-col :md="6" :sm="8">
  74. <a-form-model-item label="辅料不含税成本(¥)" prop="excipiencostNotincludestax">
  75. {{ detailsPlanNum.excipiencostNotincludestax }}
  76. </a-form-model-item>
  77. </a-col>
  78. <a-col :md="6" :sm="8">
  79. <a-form-model-item label="外销总价($)" prop="usdTotalexportprice">
  80. {{ detailsPlanNum.usdTotalexportprice }}
  81. </a-form-model-item>
  82. </a-col>
  83. <a-col :md="6" :sm="8">
  84. <a-form-model-item label="外销金额(¥)" prop="rmbExportamount">
  85. {{ detailsPlanNum.rmbExportamount }}
  86. </a-form-model-item>
  87. </a-col>
  88. <a-col :md="6" :sm="8">
  89. <a-form-model-item label="实际出货数量" prop="actualShipquantity">
  90. {{ detailsPlanNum.actualShipquantity }}
  91. </a-form-model-item>
  92. </a-col>
  93. <a-col :md="6" :sm="8">
  94. <a-form-model-item label="加工费(¥)" prop="rmbProcesscost">
  95. {{ detailsPlanNum.rmbProcesscost }}
  96. </a-form-model-item>
  97. </a-col>
  98. <a-col :md="6" :sm="8">
  99. <a-form-model-item label="加工费($)" prop="usdProcesscost">
  100. {{ detailsPlanNum.usdProcesscost }}
  101. </a-form-model-item>
  102. </a-col>
  103. <a-col :md="6" :sm="8">
  104. <a-form-model-item label="运杂费($)" prop="usdExpense" >
  105. <a href="javascript:void(0)" @click="mainTableExpenseUSD()" >{{ detailsPlanNum.usdExpense }}</a>
  106. </a-form-model-item>
  107. </a-col>
  108. <a-col :md="6" :sm="8">
  109. <a-form-model-item label="不含税运杂费(¥)" prop="rmbExpense" >
  110. {{detailsPlanNum.rmbExpense }}
  111. </a-form-model-item>
  112. </a-col>
  113. <a-col :md="6" :sm="8">
  114. <a-form-model-item label="事故金额($)" prop="accidentUsdamount" >
  115. {{ detailsPlanNum.accidentUsdamount }}
  116. </a-form-model-item>
  117. </a-col>
  118. <a-col :md="6" :sm="8">
  119. <a-form-model-item label="事故金额(¥)" prop="accidentcnyAmount" >
  120. {{ detailsPlanNum.accidentcnyAmount }}
  121. </a-form-model-item>
  122. </a-col>
  123. <a-col :md="6" :sm="8">
  124. <a-form-model-item label="计划数量" prop="planQuantity">
  125. {{ detailsPlanNum.planQuantity }}
  126. </a-form-model-item>
  127. </a-col>
  128. <a-col :md="6" :sm="8">
  129. <a-form-model-item label="短出数" prop="shortseveral" >
  130. {{ detailsPlanNum.shortseveral }}
  131. </a-form-model-item>
  132. </a-col>
  133. <a-col :md="6" :sm="8">
  134. <a-form-model-item label="短出货值" prop="shortvalue" >
  135. {{ detailsPlanNum.shortvalue }}
  136. </a-form-model-item>
  137. </a-col>
  138. <a-col :md="6" :sm="8">
  139. <a-form-model-item label="面料成本($)" prop="fabriccostIncludestaxUsd" >
  140. {{ detailsPlanNum.fabriccostIncludestaxUsd }}
  141. </a-form-model-item>
  142. </a-col>
  143. <a-col :md="6" :sm="8">
  144. <a-form-model-item label="面料成本(¥)" prop="fabriccostIncludestax" >
  145. {{ detailsPlanNum.fabriccostIncludestax }}
  146. </a-form-model-item>
  147. </a-col>
  148. <a-col :md="6" :sm="8">
  149. <a-form-model-item label="辅料成本($)" prop="excipiencostIncludestaxUsd">
  150. {{ detailsPlanNum.excipiencostIncludestaxUsd}}
  151. <!-- {{ detailsPlanNum.excipiencostIncludestaxUsd }} -->
  152. </a-form-model-item>
  153. </a-col>
  154. <a-col :md="6" :sm="8">
  155. <a-form-model-item label="辅料成本(¥)" prop="excipiencostIncludestax">
  156. {{ detailsPlanNum.excipiencostIncludestax }}
  157. </a-form-model-item>
  158. </a-col>
  159. <a-col :md="6" :sm="8">
  160. <a-form-model-item label="销售订单总额(¥)" prop="salesordersLocaltotal">
  161. {{ detailsPlanNum.salesordersLocaltotal }}
  162. </a-form-model-item>
  163. </a-col>
  164. <a-col :md="6" :sm="8">
  165. <a-form-model-item label="销售订单总额($)" prop="salesrrdersOriginaltotal">
  166. {{ detailsPlanNum.salesrrdersOriginaltotal }}
  167. </a-form-model-item>
  168. </a-col>
  169. <a-col :md="6" :sm="8">
  170. <a-form-model-item label="运杂费(¥)" prop="rmbExpense">
  171. <a href="javascript:void(0)" @click="mainTableExpenseCNY()">{{ detailsPlanNum.rmbExpense }}</a>
  172. </a-form-model-item>
  173. </a-col>
  174. <a-col :md="6" :sm="8">
  175. <a-form-model-item label="运费税额" prop="shuiemoney">
  176. {{detailsPlanNum.shuiemoney}}
  177. </a-form-model-item>
  178. </a-col>
  179. <!-- <a-col :md="6" :sm="8">
  180. <a-form-model-item label="供应商事故单($)" prop="salesrrdersOriginaltotal">
  181. {{ detailsPlanNum.supperAccidentUsdamount, }}
  182. </a-form-model-item>
  183. </a-col>
  184. <a-col :md="6" :sm="8">
  185. <a-form-model-item label="供应商事故单(¥)" prop="salesrrdersOriginaltotal">
  186. {{ detailsPlanNum.supperAccidentcnyAmount }}
  187. </a-form-model-item>
  188. </a-col> -->
  189. <a-col :md="6" :sm="8">
  190. <a-form-model-item label="税率%" prop="taxrate" >
  191. <a-input placeholder="请输入" v-model="detailsPlanNum.taxrate" @blur="changeTaxrate" class="taxrate" v-show='showSelect==0'/>
  192. <span v-show='showSelect==1'>{{ detailsPlanNum.taxrate }}</span>
  193. </a-form-model-item>
  194. </a-col>
  195. <!-- <a-col :md="6" :sm="8">
  196. <a-form-model-item label="短出面料成本" prop="fabricshortcost" class="fontColor">
  197. {{ detailsPlanNum.fabricshortcost }}
  198. </a-form-model-item>
  199. </a-col> -->
  200. <!-- <a-col :md="6" :sm="8">
  201. <a-form-model-item label="面料不含税成本(美元)" prop="UsdfabriccostNotincludestax" >
  202. {{ detailsPlanNum.fabriccostNotincludestaxUsd }}
  203. </a-form-model-item>
  204. </a-col> -->
  205. <!--
  206. <a-col :md="6" :sm="8">
  207. <a-form-model-item label="辅料不含税成本(美元)" prop="UsdexcipiencostNotincludestax">
  208. {{ detailsPlanNum.excipiencostNotincludestaxUsd }}
  209. </a-form-model-item>
  210. </a-col> -->
  211. <!-- <a-col :md="6" :sm="8">
  212. <a-form-model-item label="制单人" prop="preparedBy">
  213. {{ detailsPlanNum.preparedBy }}
  214. </a-form-model-item>
  215. </a-col> -->
  216. <a-col :md="6" :sm="8">
  217. <a-form-model-item label="备注" prop="memo" >
  218. <a-input style="width:100%" type="text" v-model="detailsPlanNum.memo" @blur="changeContainerNumber" v-show='showSelect==0'/>
  219. <span v-show='showSelect==1'>{{ detailsPlanNum.memo }}</span>
  220. </a-form-model-item>
  221. </a-col>
  222. <!-- <a-col :md="6" :sm="8">
  223. <a-form-model-item label="查询时间" prop="UsdfabriccostNotincludestax" >
  224. {{ }}
  225. </a-form-model-item>
  226. </a-col>
  227. <a-col :md="6" :sm="8">
  228. <a-form-model-item label="查询人" prop="UsdfabriccostNotincludestax" >
  229. {{ }}
  230. </a-form-model-item>
  231. </a-col>
  232. <a-col :md="6" :sm="8">
  233. <a-form-model-item label="" prop="UsdfabriccostNotincludestax" >
  234. {{ }}
  235. </a-form-model-item>
  236. </a-col> -->
  237. <a-col :md="6" :sm="8">
  238. <a-form-model-item label="制单人" prop="preparedBy">
  239. {{ detailsPlanNum.preparedBy }}
  240. </a-form-model-item>
  241. </a-col>
  242. <a-col :md="6" :sm="8">
  243. <a-form-model-item label="查询人" prop="queryBy">
  244. {{ detailsPlanNum.queryBy }}
  245. </a-form-model-item>
  246. </a-col>
  247. <a-col :md="6" :sm="8">
  248. <a-form-model-item label="查询时间" prop="queryTime">
  249. {{ detailsPlanNum.queryTime }}
  250. </a-form-model-item>
  251. </a-col>
  252. <a-col :md="6" :sm="8" class="noprint">
  253. <a-form-model-item label="" prop="" >
  254. <h4 style="color:red;" v-if="color1<0">
  255. 标记(A)
  256. <!-- <span>(计算结果是负值时,该标记是红色)</span> -->
  257. </h4>
  258. <h4 style="color:black;" v-else>
  259. 标记(A)
  260. <!-- <span>(计算结果是负值时,该标记是红色)</span> -->
  261. </h4>
  262. </a-form-model-item>
  263. </a-col>
  264. <a-col :md="6" :sm="8" class="noprint">
  265. <a-form-model-item label="" prop="" >
  266. <h4 style="color:blue;" v-if="color2<0.8">
  267. 标记(B)
  268. <!-- <span>(计算结果小于O.8 时,该标记是蓝色)</span> -->
  269. </h4>
  270. <h4 style="color:black;" v-else>
  271. 标记(B)
  272. <!-- <span>(计算结果小于O.8 时,该标记是蓝色)</span> -->
  273. </h4>
  274. </a-form-model-item>
  275. </a-col>
  276. <a-col :md="6" :sm="8" class="noprint">
  277. <a-upload productName="file" :showUploadList="true" :file-list="fileList" :headers="tokenHeader" :multiple="false" :action="importExcelUrl" @change="handleImportExcel" :data="{code:this.detailsPlanNum.planNum,name:this.fileName}" :beforeUpload="uploadFlie" :remove="removeFile">
  278. <a-button type="primary" >附件上传</a-button>
  279. </a-upload>
  280. </a-col>
  281. </a-form-model>
  282. </div>
  283. </a-row>
  284. </a-card>
  285. <!--tabs 组件引入 -->
  286. <a-card :bordered="false" style=" marginTop:10px;">
  287. <div><tabs ref="unitTabs" :showSelect='showSelect' @number="number" :planNum="this.detailsPlanNum.planNum"/></div>
  288. </a-card>
  289. <!-- 事故单 -->
  290. <a-card :bordered="true" style="margin:10px 0">
  291. <div style="margin:60px 0 40px 0" :class="[(accidentListData.length==0?'noprint': '')]">
  292. <h6 class="table-title">事故单</h6>
  293. <a-table
  294. rowKey="id"
  295. :loading="loading"
  296. :columns="accidentListColumns"
  297. :data-source="accidentListData"
  298. bordered
  299. :pagination="false"
  300. :scroll="{ }"
  301. >
  302. <!-- 事故单 -->
  303. <span slot="accidentNum" slot-scope="text,record">
  304. <a :href="'http://www.myfitt.cn:18086/#/IncidentTicketModalDetail?id='+record.id" target="_blank">{{ text }}</a>
  305. </span>
  306. </a-table>
  307. </div>
  308. <!-- 费用支出 -->
  309. <div :class="[(costPayData.length==0?'noprint': '')]">
  310. <h6 class="table-title" >费用支出</h6>
  311. <a-table
  312. rowKey="id"
  313. :loading="loading"
  314. :columns="costPayColumns"
  315. :data-source="costPayData"
  316. bordered
  317. :pagination="false"
  318. >
  319. </a-table>
  320. </div>
  321. <!-- 备注信息 根据角色权限控制【填写】、【查看】-->
  322. <div class="note-one" style="marginTop:40px;">
  323. <h6 class="table-title">备注</h6>
  324. <div class="noteDetail">
  325. <a-form-model ref="form" :model="detailsPlanNum">
  326. <a-form-model-item prop="remarks">
  327. <a-input type="textarea" v-model="detailsPlanNum.remarks" placeholder="请输入备注" style="minHeight:100px;" v-show='showSelect==0' />
  328. <a-input type="textarea" v-text="detailsPlanNum.remarks" style="minHeight:100px;" v-show='showSelect==1'/>
  329. </a-form-model-item>
  330. </a-form-model>
  331. </div>
  332. </div>
  333. <!-- 页面底部保存 -->
  334. <a-row :gutter="24" style="marginTop:40px;float:right" class="noprint">
  335. <a-col :md="12" :sm="12" style="display:flex">
  336. <a-button type="primary" @click="daYin" style="margin-right:6px" :disabled ="PrintButton">
  337. 打印
  338. </a-button>
  339. <a-button type="primary" @click="save" :disabled="isDisabled">
  340. 保存
  341. </a-button>
  342. </a-col>
  343. </a-row>
  344. </a-card>
  345. <!-- 弹框 -->
  346. <div>
  347. <!-- 主表 人民币费用支出 弹框 -->
  348. <mainTableExpenseCNY-modal ref="mainTableExpenseCNYModal" :father="aa"></mainTableExpenseCNY-modal>
  349. <!-- 主表 美元费用支出 弹框 -->
  350. <mainTableExpenseUSD-modal ref="mainTableExpenseUSDModal" :father="bb"></mainTableExpenseUSD-modal>
  351. <!-- 事故单 -->
  352. <accidentList-modal ref="accidentListModal" :father="cc"></accidentList-modal>
  353. </div>
  354. </div>
  355. </template>
  356. <script>
  357. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  358. import JEllipsis from '@/components/jeecg/JEllipsis'
  359. import moment from 'moment'
  360. // 原始文件(应该跟单证内弹框一样,尝试公用,成功后可删除以下注释)
  361. // import mainTableExpenseCNYModal from '@views/reportForms/cost-allocation-table/mainTableExpenseCNYModal.vue'
  362. // import mainTableExpenseUSDModal from '@views/reportForms/cost-allocation-table/mainTableExpenseUSDModal.vue'
  363. // import accidentListModal from '@views/reportForms/fabric-loss-table/accidentListModal.vue' // 事故单
  364. // import tabs from '@views/cost-allocation-total/tabs.vue' // tabs组件
  365. import tabs from '@views/reportForms/cost-allocation-table/tabs.vue' // tabs组件
  366. import mainTableExpenseCNYModal from '@views/cost-allocation-total/modal/mainTableExpenseCNYModal.vue'
  367. import mainTableExpenseUSDModal from '@views/cost-allocation-total/modal/mainTableExpenseUSDModal.vue'
  368. import accidentListModal from '@views/cost-allocation-total/modal/accidentListModal.vue' // 事故单
  369. import { seachPlanNum, addHalfInfo,deleteFileDetail } from '@api/document/cost-allocation-total.js'
  370. export default {
  371. name: 'CostAllocationTable', // 成本分配 (新增)
  372. mixins: [JeecgListMixin],
  373. components: { JEllipsis, moment, tabs, mainTableExpenseCNYModal, mainTableExpenseUSDModal, accidentListModal },
  374. data() {
  375. return {
  376. key: '', //客户输入的订单号
  377. PrintButton:true,//打印按钮
  378. showSelect:0,//计划号是否是输入框
  379. loading: false, // 表格加载
  380. detailsPlanNum: {
  381. planNum: ''
  382. }, // 详情所有数据
  383. remarks: '', // 备注
  384. // 事故单 表头
  385. accidentListColumns: [
  386. {
  387. title: '单号',
  388. width: 120,
  389. dataIndex: 'accidentNumber',
  390. className: 'replacecolor',
  391. customCell: this.accidentListCustomCell,
  392. scopedSlots: { customRender: 'accidentNum' }
  393. },
  394. { title: '事故承担方', width: 120, dataIndex: 'accidentUndertaker', className: 'replacecolor' },
  395. {
  396. title: '美元金额',
  397. width: 120,
  398. dataIndex: 'amount',
  399. className: 'replacecolor' ,
  400. customRender: (text, record, index) => {
  401. if(text!==''&&text){
  402. return Number(text).toFixed(2)
  403. }
  404. },
  405. },
  406. {
  407. title: '人民币金额',
  408. width: 120,
  409. dataIndex: 'amountrmb',
  410. className: 'replacecolor' ,
  411. customRender: (text, record, index) => {
  412. if(text!==''&&text){
  413. return Number(text).toFixed(2)
  414. }
  415. },
  416. },
  417. { title: '事故单主题', width: 120, dataIndex: 'accidentTheme', className: 'replacecolor' },
  418. { title: '责任人', width: 120, dataIndex: 'responsibilityPerson1', className: 'replacecolor' },
  419. // { title: '币种', width: 120, dataIndex: 'moneyType', className: 'replacecolor' },
  420. // { title: '金额', dataIndex: 'amount', width: 120, className: 'replacecolor' }
  421. ],
  422. accidentListData: [],
  423. // 费用支出 表头
  424. costPayColumns: [
  425. { title: '账套号', width: 120, dataIndex: 'setNo', className: 'replacecolor' },
  426. { title: '支出单号', width: 120, dataIndex: 'disbursementSlipNo', className: 'replacecolor' },
  427. { title: '费用项目', dataIndex: 'expenseItem', width: 120, className: 'replacecolor' },
  428. {
  429. title: '美元',
  430. dataIndex: 'disbursedOriginalmoney',
  431. width: 120,
  432. className: 'replacecolor' ,
  433. customRender: (text, record, index) => {
  434. if(text!==''&&text){
  435. return Number(text).toFixed(2)
  436. }
  437. },
  438. },
  439. {
  440. title: '人民币(不含税)',
  441. dataIndex: 'disbursedLocalmoney',
  442. width: 120, className: 'replacecolor',
  443. customRender: (text, record, index) => {
  444. if(text!==''&&text){
  445. return Number(text).toFixed(2)
  446. }
  447. },
  448. },
  449. {
  450. title: '人民币(税额)',
  451. dataIndex: 'shuiemoney',
  452. width: 120,
  453. className: 'replacecolor',
  454. customRender: (text, record, index) => {
  455. if(text!==''&&text){
  456. return Number(text).toFixed(2)
  457. }
  458. },
  459. },
  460. {
  461. title: '人民币(价税合计)',
  462. dataIndex: 'iNatMoney',
  463. width: 120,
  464. className: 'replacecolor',
  465. customRender: (text, record, index) => {
  466. if(text!==''&&text){
  467. return Number(text).toFixed(2)
  468. }
  469. }, },
  470. { title: '发票号', dataIndex: 'invoicenum', width: 120, className: 'replacecolor' },
  471. { title: '制单人', dataIndex: 'preparedBy', width: 120, className: 'replacecolor' }
  472. ],
  473. costPayData: [],
  474. isDisabled: false, //按钮禁止
  475. billstatus: '', // 单据状态
  476. color1:0,
  477. color2:0,
  478. fileList:[],
  479. url: {
  480. list: '/sys/user/list',
  481. importExcelUrl: 'cost/syCostAllocation/addFile' ,// 导入
  482. }
  483. // dateFormat: 'YYYY-MM-DD',
  484. }
  485. },
  486. created() {
  487. document.title = '成本分配表'+ ' · ' + '森语'
  488. },
  489. filters: {
  490. //文字数超出时,超出部分使用...
  491. ellipsis(value) {
  492. if (!value) return ''
  493. if (value.length > 20) {
  494. return value.slice(0, 20) + '...'
  495. }
  496. return value
  497. }
  498. },
  499. methods: {
  500. // 【计划单号】 搜索
  501. onSearch(data) {
  502. this.$nextTick(() => {
  503. // TODO:接口完善后,type 应改为 add(暂时为了回显数据)
  504. this.loading = true
  505. seachPlanNum({ plannum: this.detailsPlanNum.planNum, type: data }).then(res => {
  506. if (res.success) {
  507. this.PrintButton = false
  508. this.loading = false
  509. this.detailsPlanNum = res.result //所有详情
  510. if(Number(this.detailsPlanNum.shortseveral)<0){
  511. this.detailsPlanNum.shortseveral = 0
  512. this.detailsPlanNum.shortvalue = 0
  513. }
  514. var fileList = (this.detailsPlanNum.attachs!==''&&this.detailsPlanNum.attachs)?this.detailsPlanNum.attachs.split(","):[]
  515. this.fileList = []
  516. if(fileList.length!==0){
  517. fileList.map(item=>{
  518. this.fileList.push({
  519. uid: '-1',
  520. name: item,
  521. status: 'done',
  522. url:'http://www.myfitt.cn:18001/jeecg-boot/sys/common/static' +'/'+item
  523. })
  524. })
  525. }
  526. //调整表头格式
  527. this.adjustingHeader()
  528. this.accidentListData = res.result.syCostAllocationAccidentList //事故单
  529. this.accidentCalculation(this.accidentListData)
  530. // var accidentNum = 0
  531. // this.accidentListData.map(item =>{
  532. // item.id = accidentNum + 1
  533. // accidentNum += 1
  534. // })
  535. this.costPayData = res.result.syCostAllocationCostpayList //支出费用
  536. var num = 0
  537. this.costPayData.map(item =>{
  538. item.id = num + 1
  539. num += 1
  540. })
  541. // tabs 名称集合
  542. this.$refs.unitTabs.tabNameList = res.result.processUnit.split(',')
  543. //所有tabs数据
  544. this.$refs.unitTabs.tabsAllData = res.result.processUnitList
  545. // 页面打开加载的数据
  546. var oneData = this.$refs.unitTabs.tabsAllData[0]
  547. this.$refs.unitTabs.fabData = oneData.syCostAllocationFabricList
  548. this.$refs.unitTabs.fabData.map(item=>{
  549. if(item.remainingQuantitycost!=='' && item.remainingQuantitycost){
  550. item.remainingQuantitycost = item.remainingQuantitycost.toFixed(2)
  551. }
  552. })
  553. this.$refs.unitTabs.ingData = oneData.syCostAllocationIngredientList
  554. this.$refs.unitTabs.shipData = oneData.syCostAllocationShipdetail
  555. this.addAmountIng(oneData.syCostAllocationIngredientList)
  556. this.addAmountCostPay(this.costPayData)
  557. this.addAccident(this.accidentListData)
  558. this.calculation(oneData.syCostAllocationShipdetail)
  559. //合计中面料相关金额
  560. var s=0
  561. oneData.syCostAllocationFabricList.map(item=>{
  562. s+=Number(item.transferCost)
  563. })
  564. // this.$refs.unitTabs.sumInfo.fabricAmount = s.toFixed(3) //合计中的面料总额
  565. this.$refs.unitTabs.sumInfo.fabricAmount = (this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(Number(this.detailsPlanNum.fabriccostIncludestax)).toFixed(2):'' //合计中的面料总额
  566. this.$refs.unitTabs.sumInfo.fabricExcludTax =(Number(this.$refs.unitTabs.sumInfo.fabricAmount)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//合计中的不含税面料总额
  567. this.detailsPlanNum.fabriccostNotincludestax = this.$refs.unitTabs.sumInfo.fabricExcludTax
  568. // this.detailsPlanNum.fabriccostIncludestax = s.toFixed(3) //表头中面料含税总额
  569. // this.detailsPlanNum.fabriccostNotincludestax = (s/1.13).toFixed(3) //表头中面料不含税总额
  570. //合计中辅料相关金额
  571. var s = 0,
  572. v =0
  573. oneData.syCostAllocationIngredientList.map(item=>{
  574. s+=Number(item.priceExcludingtax),
  575. v+=item.rmbAmount?Number(item.rmbAmount):0
  576. })
  577. this.$refs.unitTabs.sumInfo.ingAmount =(v/2).toFixed(2)//辅料金额合计
  578. this.$refs.unitTabs.sumInfo.ingExcludAmount = ((v/2).toFixed(2)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//辅料不含税金额合计
  579. this.detailsPlanNum.excipiencostNotincludestax = this.$refs.unitTabs.sumInfo.ingExcludAmount
  580. //合计中出运明细相关金额
  581. var s =0,
  582. v = 0,
  583. d = 0,
  584. b = 0,
  585. f=0,
  586. e=0
  587. oneData.syCostAllocationShipdetail.map(item=>{
  588. s+=Number(item.exportPrice)
  589. v+=Number(item.shipQuantity)
  590. d+=Number(item.processCost)
  591. b+=Number(item.rmbAmount)
  592. if(item.exchangeRate=='6.888' && item.outdata!=='合计'){
  593. e+=Number(item.processCost)
  594. }else if(item.outdata!=='合计'){
  595. e+=(Number(item.processCost)/1.13)
  596. }
  597. })
  598. this.$refs.unitTabs.sumInfo.exportPriceUSD = (s/2).toFixed(2)//出运美元外销总价
  599. this.detailsPlanNum.usdTotalexportprice = this.$refs.unitTabs.sumInfo.exportPriceUSD //表头-外销总价($)
  600. this.$refs.unitTabs.sumInfo.shipQua =(v/2).toFixed(4)//出货数量合计
  601. this.$refs.unitTabs.sumInfo.shipProcesFees =(d/2).toFixed(2)//出运加工费
  602. this.$refs.unitTabs.sumInfo.exportedAmountRMB =(b/2).toFixed(2)//出运人民币外销金额 f
  603. this.detailsPlanNum.rmbExportamount = this.$refs.unitTabs.sumInfo.exportedAmountRMB //表头-外销总价(¥)
  604. this.$refs.unitTabs.sumInfo.excludingTaxProcessing =e.toFixed(2)//
  605. f=Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number(this.$refs.unitTabs.sumInfo.shipProcesFees)
  606. this.$refs.unitTabs.sumInfo.amountTotal = (Number(this.$refs.unitTabs.sumInfo.fabricAmount)+Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number( this.$refs.unitTabs.sumInfo.shipProcesFees)).toFixed(2)//合计金额
  607. this.pagination = {
  608. total: res.result.total,
  609. current: res.result.current,
  610. pageSize: res.result.size
  611. }
  612. }else {
  613. this.loading = false
  614. this.$message.error(res.message);
  615. }
  616. })
  617. })
  618. },
  619. uploadFlie(file) {
  620. this.fileName = file.name
  621. },
  622. handleImportExcel(data){
  623. if(data.fileList.length>this.fileList.length&&data.file.status=='uploading'){
  624. var that =this
  625. setTimeout(()=>{
  626. that.onSearch('query')
  627. },1000)
  628. }
  629. },
  630. removeFile(data){
  631. deleteFileDetail({code:this.detailsPlanNum.planNum,name:data.name}).then(res => {
  632. if (res.success) {
  633. var cc=[]
  634. this.fileList.map(item=>{
  635. if(item.name !== data.name){
  636. cc.push(item)
  637. }
  638. })
  639. this.fileList = cc
  640. this.loading =false
  641. this.$message.success('删除成功');
  642. }else{
  643. this.$message.error(res.message);
  644. }
  645. })
  646. },
  647. //调整表头格式
  648. adjustingHeader(){
  649. this.detailsPlanNum.outdata = ( this.detailsPlanNum.outdata==''||!this.detailsPlanNum.outdata)?0:moment( this.detailsPlanNum.outdata).format('YYYY-MM-DD')
  650. this.detailsPlanNum.planQuantity=( this.detailsPlanNum.planQuantity==''|| !this.detailsPlanNum.planQuantity)?0:Number( this.detailsPlanNum.planQuantity).toFixed(0)//计划数量
  651. this.detailsPlanNum.usdTotalexportprice=( this.detailsPlanNum.usdTotalexportprice==''|| !this.detailsPlanNum.usdTotalexportprice)?0:Number( this.detailsPlanNum.usdTotalexportprice).toFixed(2)//美元外销总价
  652. this.detailsPlanNum.rmbExpense=( this.detailsPlanNum.rmbExpense==''|| !this.detailsPlanNum.rmbExpense)?0:Number( this.detailsPlanNum.rmbExpense).toFixed(2)//人民币费用支出
  653. this.detailsPlanNum.actualShipquantity=( this.detailsPlanNum.actualShipquantity==''|| !this.detailsPlanNum.actualShipquantity)?0:Number( this.detailsPlanNum.actualShipquantity).toFixed(0)//实际出库数量
  654. this.detailsPlanNum.rmbExportamount=( this.detailsPlanNum.rmbExportamount==''|| !this.detailsPlanNum.rmbExportamount)?0:Number( this.detailsPlanNum.rmbExportamount).toFixed(2)//人民币外销金额
  655. this.detailsPlanNum.usdExpense=( this.detailsPlanNum.usdExpense==''|| !this.detailsPlanNum.usdExpense)?0:Number( this.detailsPlanNum.usdExpense).toFixed(2)//美元费用支出
  656. // this.detailsPlanNum.rmbProcesscost=( this.detailsPlanNum.rmbProcesscost==''|| !this.detailsPlanNum.rmbProcesscost)?'':Number( this.detailsPlanNum.rmbProcesscost).toFixed(2)//加工费(人民币)
  657. this.detailsPlanNum.accidentUsdamount=( this.detailsPlanNum.accidentUsdamount==''|| !this.detailsPlanNum.accidentUsdamount)?0:Number( this.detailsPlanNum.accidentUsdamount).toFixed(2)//事故单美元金额
  658. this.detailsPlanNum.fabriccostIncludestax=( this.detailsPlanNum.fabriccostIncludestax==''|| !this.detailsPlanNum.fabriccostIncludestax)?0:Number( this.detailsPlanNum.fabriccostIncludestax).toFixed(2)//面料含税成本
  659. this.detailsPlanNum.excipiencostIncludestax=( this.detailsPlanNum.excipiencostIncludestax==''|| !this.detailsPlanNum.excipiencostIncludestax)?0:Number( this.detailsPlanNum.excipiencostIncludestax).toFixed(2)//辅料含税成本
  660. this.detailsPlanNum.salesordersLocaltotal=( this.detailsPlanNum.salesordersLocaltotal==''|| !this.detailsPlanNum.salesordersLocaltotal)?0:Number( this.detailsPlanNum.salesordersLocaltotal).toFixed(2)//销售本币金额
  661. this.detailsPlanNum.accidentcnyAmount=( this.detailsPlanNum.accidentcnyAmount==''|| !this.detailsPlanNum.accidentcnyAmount)?0:Number( this.detailsPlanNum.accidentcnyAmount).toFixed(2)//事故单人民币金额
  662. this.detailsPlanNum.fabriccostNotincludestax=( this.detailsPlanNum.fabriccostNotincludestax==''|| !this.detailsPlanNum.fabriccostNotincludestax)?0:Number( this.detailsPlanNum.fabriccostNotincludestax).toFixed(2)//面料不含税成本
  663. this.detailsPlanNum.excipiencostNotincludestax=( this.detailsPlanNum.excipiencostNotincludestax==''|| !this.detailsPlanNum.excipiencostNotincludestax)?0:Number( this.detailsPlanNum.excipiencostNotincludestax).toFixed(2)//辅料料不含税成本
  664. this.detailsPlanNum.salesrrdersOriginaltotal=( this.detailsPlanNum.salesrrdersOriginaltotal==''|| !this.detailsPlanNum.salesrrdersOriginaltotal)?0:Number( this.detailsPlanNum.salesrrdersOriginaltotal).toFixed(2)//销售订单原币金额
  665. this.detailsPlanNum.excipiencostIncludestaxUsd=( this.detailsPlanNum.excipiencostIncludestaxUsd==''|| !this.detailsPlanNum.excipiencostIncludestaxUsd)?0: this.detailsPlanNum.excipiencostIncludestaxUsd//辅料成本($)
  666. this.detailsPlanNum.shuiemoney=( this.detailsPlanNum.shuiemoney==''|| !this.detailsPlanNum.shuiemoney)?0: this.detailsPlanNum.shuiemoney//运费税额
  667. this.detailsPlanNum.fabriccostIncludestax=( this.detailsPlanNum.fabriccostIncludestax==''|| !this.detailsPlanNum.fabriccostIncludestax)?0:Number( this.detailsPlanNum.fabriccostIncludestax).toFixed(2)//面料含税成本
  668. this.color1 = Number(this.detailsPlanNum.rmbExportamount)-Number(this.detailsPlanNum.fabriccostNotincludestax)-Number(this.detailsPlanNum.excipiencostNotincludestax)-Number(this.detailsPlanNum.rmbProcesscost)-Number(this.detailsPlanNum.rmbExpense)
  669. this.color2 = this.color1/Number(this.detailsPlanNum.usdTotalexportprice)
  670. this.color2 = this.color2>0?this.color2:-this.color2
  671. if(this.detailsPlanNum.pkOrg=='103'){
  672. this.detailsPlanNum.rmbProcesscost = (Number(this.detailsPlanNum.rmbProcesscost)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)
  673. }
  674. },
  675. //计算出运明细合计行
  676. calculation(val){
  677. // var average = 0
  678. // val.map(item=>{
  679. // if(item.outdata !=='合计'){
  680. // average += (Number(item.exportUnitPrice)*Number(item.shipQuantity)*Number(item.exchangeRate))
  681. // }
  682. // })
  683. // this.detailsPlanNum.shortvalue = average.toFixed(2)
  684. var shipQuantityAll =0,
  685. // exportUnitPriceALll = 0,
  686. exportPriceAll =0,
  687. rmbAmountAll = 0,
  688. // procesUnitPricermbAll = 0,
  689. // procesUnitPriceusdAll = 0,
  690. processCostAll = 0
  691. val.map(item=>{
  692. if(item.outdata !=='合计'){
  693. shipQuantityAll+=Number(item.shipQuantity)
  694. // exportUnitPriceALll+=Number(item.exportUnitPrice)
  695. exportPriceAll+=Number(item.exportPrice)
  696. rmbAmountAll+=Number(item.rmbAmount)
  697. // procesUnitPricermbAll+=Number(item.procesUnitPricermb)
  698. // procesUnitPriceusdAll+=Number(item.procesUnitPriceusd)
  699. processCostAll+=Number(item.processCost)
  700. }
  701. })
  702. var allObj ={
  703. outdata:'合计',
  704. shipQuantity:shipQuantityAll.toFixed(3),
  705. // exportUnitPrice:exportUnitPriceALll.toFixed(3),
  706. exportPrice:exportPriceAll.toFixed(3),
  707. rmbAmount:rmbAmountAll.toFixed(3),
  708. // procesUnitPricermb:procesUnitPricermbAll.toFixed(3),
  709. // procesUnitPriceusd:procesUnitPriceusdAll.toFixed(3),
  710. processCost:processCostAll.toFixed(3)
  711. }
  712. // this.detailsPlanNum.salesordersLocaltotal = rmbAmountAll.toFixed(2)
  713. //发运明细-合计行
  714. if(this.$refs.unitTabs.shipData.length!==0 ){
  715. if(this.$refs.unitTabs.shipData[this.$refs.unitTabs.shipData.length-1].outdata=='合计'){
  716. this.$refs.unitTabs.shipData.pop()
  717. }
  718. this.$refs.unitTabs.shipData.push(allObj)
  719. }
  720. this.$refs.unitTabs.shipData.map(item=>{
  721. item.shipQuantity = Number(item.shipQuantity)
  722. item.exportUnitPrice = Number(item.exportUnitPrice)
  723. item.exportPrice = Number(item.exportPrice)
  724. item.rmbAmount = Number(item.rmbAmount)
  725. item.procesUnitPricermb = Number(item.procesUnitPricermb)
  726. item.procesUnitPriceusd = Number(item.procesUnitPriceusd)
  727. item.processCost = Number(item.processCost)
  728. })
  729. },
  730. //辅料中的合计行
  731. addAmountIng(val){
  732. var
  733. transferCostAll =0,
  734. rmbAmountAll = 0,
  735. usdAmountAll = 0,
  736. priceExcludingtaxAll = 0
  737. val.map(item=>{
  738. if(item.goodsName!=='合计'){
  739. transferCostAll+=Number(item.transferCost)
  740. rmbAmountAll+=item.rmbAmount?Number(item.rmbAmount):0
  741. usdAmountAll+=item.usdAmount?Number(item.usdAmount):0
  742. priceExcludingtaxAll+=item.priceExcludingtax?Number(item.priceExcludingtax):0
  743. }
  744. })
  745. var allObj ={
  746. goodsName:'合计',
  747. transferCost:transferCostAll,
  748. rmbAmount:rmbAmountAll,
  749. usdAmount:usdAmountAll,
  750. priceExcludingtax:priceExcludingtaxAll,
  751. ingredientsTransferQuantity:'',
  752. ingredientsRemainingQuantity:''
  753. }
  754. if(this.$refs.unitTabs.ingData.length!==0 ){
  755. if(this.$refs.unitTabs.ingData[this.$refs.unitTabs.ingData.length-1].goodsName=='合计'){this.$refs.unitTabs.ingData.pop()}
  756. this.$refs.unitTabs.ingData.push(allObj)
  757. }
  758. if(rmbAmountAll == usdAmountAll){
  759. this.detailsPlanNum.excipiencostIncludestaxUsd = 0
  760. }else{
  761. this.detailsPlanNum.excipiencostIncludestaxUsd = usdAmountAll.toFixed(2)
  762. }
  763. },
  764. //事故单合计行
  765. addAccident(val){
  766. var amountAll=0,
  767. amountrmbAll=0
  768. val.map(item=>{
  769. if(item.accidentUndertaker!=='合计'){
  770. amountAll+=Number(item.amount)
  771. amountrmbAll+=Number(item.amountrmb)
  772. }
  773. })
  774. var allObj={
  775. accidentUndertaker:'合计',
  776. amount:amountAll,
  777. amountrmb:amountrmbAll
  778. }
  779. if(this.accidentListData.length!==0 ){
  780. if(this.accidentListData[this.accidentListData.length-1].accidentUndertaker=='合计'){this.accidentListData.pop()}
  781. this.accidentListData.push(allObj)
  782. }
  783. },
  784. //费用支出合计行
  785. addAmountCostPay(val){
  786. var disbursedLocalmoneyALL=0,
  787. disbursedOriginalmoneyALL=0,
  788. shuiemoneyAll = 0
  789. val.map(item=>{
  790. if(item.setNo!=='合计'){
  791. disbursedLocalmoneyALL+=Number(item.disbursedLocalmoney)
  792. disbursedOriginalmoneyALL+=Number(item.disbursedOriginalmoney)
  793. shuiemoneyAll+=Number(item.shuiemoney)
  794. }
  795. })
  796. var obj={
  797. setNo:'合计',
  798. disbursedLocalmoney:disbursedLocalmoneyALL,
  799. disbursedOriginalmoney:disbursedOriginalmoneyALL,
  800. shuiemoney:shuiemoneyAll.toFixed(3),
  801. iNatMoney:(disbursedLocalmoneyALL+shuiemoneyAll)
  802. }
  803. if(this.costPayData.length!==0){
  804. if(this.costPayData[this.costPayData.length-1].setNo=='合计'){this.costPayData.pop()}
  805. this.costPayData.push(obj)
  806. }
  807. },
  808. daYin(){
  809. this.showSelect = 1
  810. this.$nextTick(() => {
  811. const html = window.document.getElementById('costAllocationTable').innerHTML
  812. const win = window.open();
  813. const style = '<style>\n'
  814. +'.noprint{display:none}'
  815. // +'.ant-table-body-inner{overflow-x: hidden !important;overflow-y: hidden !important }' //去除滚动条
  816. +'.ant-table-body{overflow-x: hidden !important ;overflow-y: hidden !important}'
  817. +'.ant-table-header {overflow-x: hidden !important ;overflow-y: hidden !important}'
  818. +'.ant-table-fixed-left{display: none !important}'
  819. +'.ant-tabs-nav-container{display: none !important}'
  820. +'.kk{display:flex;flex-wrap: wrap}' //主要信息并排
  821. +'.ant-col-sm-8{width:40%;margin-bottom: 6px;}'
  822. +'.ant-form-item-label{width:55%;font-size: 12px;}'
  823. +'.ant-form-item-children{font-size: 12px}'
  824. +'.ant-card-head-title{font-weight: bold;font-size: 0.67em;margin-bottom: 9px;}'
  825. +'.ant-form-item-control-wrapper{width:100%}'
  826. +'.ant-input{width:100%}'
  827. +'.ant-form-item{display:flex}'
  828. + 'table{width: 100% !important;border-collapse: collapse;border-spacing: 0;overflow-x:hidden;}\n'
  829. + 'th,td{width:2%;height: 18px;border: 1px solid #999;font-size: 12px;color: #666;max-width:2000px;text-align: center;word-wrap: break-word;}\n'
  830. +'.ant-table-row-cell-break-word{width:5% !important}'
  831. + 'th{color: #333}\n'
  832. + 'a{color: #666; text-decoration:none;}\n'
  833. + '</style>';
  834. win.document.write(style+html);
  835. win.focus();
  836. win.print();
  837. win.close();
  838. this.showSelect = 0
  839. })
  840. },
  841. //该表税率
  842. changeTaxrate(){
  843. this.$refs.unitTabs.changeTaxrate(this.detailsPlanNum.taxrate)
  844. },
  845. //计算事故单美元金额和事故单人民币金额
  846. accidentCalculation(val){
  847. var usaMoney = 0,
  848. rmbMoney = 0
  849. val.map(item=>{
  850. if(item.accidentType=='应补' && item.amount!==''&&item.amount&&item.amount!=='0'){
  851. item.amount=Number(item.amount)*(-1)
  852. }else if(item.accidentType=='应补' && item.amountrmb!==''&&item.amountrmb&&item.amountrmb!=='0'){
  853. item.amountrmb = Number(item.amountrmb)*(-1)
  854. }
  855. usaMoney += Number(item.amount),
  856. rmbMoney+=Number(item.amountrmb)
  857. })
  858. this.detailsPlanNum.accidentUsdamount = usaMoney.toFixed(2)
  859. this.detailsPlanNum.accidentcnyAmount = rmbMoney.toFixed(2)
  860. },
  861. // 页面 保存
  862. save() {
  863. console.log('点击保存')
  864. this.isDisabled = true
  865. setTimeout(() => {
  866. let that = this
  867. that.isDisabled = false
  868. }, 3000)
  869. // if (this.detailsPlanNum.remarks) {
  870. // 保存 部分信息
  871. var halfInfo = {}
  872. // halfInfo.planNum = this.detailsPlanNum.planNum
  873. // halfInfo.remarks = this.detailsPlanNum.remarks
  874. // halfInfo.billstatus = '1'
  875. // console.log(halfInfo.planNum, halfInfo.remarks, halfInfo.billstatus)
  876. // var planNum = this.detailsPlanNum.planNum,
  877. var json = this.detailsPlanNum
  878. json.outdata=moment(json.outdata).format('YYYY-MM-DD hh:mm:ss')
  879. addHalfInfo(json).then(res => {
  880. this.isDisabled = false
  881. if (res.success) {
  882. console.log('保存的部分信息', halfInfo)
  883. this.$message.success('保存成功')
  884. halfInfo = {}
  885. }else{
  886. this.$message.error(res.message);
  887. }
  888. })
  889. // } else {
  890. // this.$message.error('备注不能为空')
  891. // }
  892. },
  893. // 主表:人民币费用支出 弹框
  894. mainTableExpenseCNY() {
  895. console.log('点击:主表人民币费用支出')
  896. this.$refs.mainTableExpenseCNYModal.mainTableExpenseCNYModVis = true
  897. this.$refs.mainTableExpenseCNYModal.mainTableExpenseCNYData = this.costPayData
  898. this.$refs.mainTableExpenseCNYModal.fixedData = this.costPayData
  899. },
  900. // 主表:美元费用支出 弹框
  901. mainTableExpenseUSD() {
  902. console.log('点击:主表美元费用支出')
  903. this.$refs.mainTableExpenseUSDModal.mainTableExpenseUSDModVis = true
  904. this.$refs.mainTableExpenseUSDModal.mainTableExpenseUSDData = this.costPayData
  905. this.$refs.mainTableExpenseUSDModal.fixedData = this.costPayData
  906. },
  907. orderDataChange(data){
  908. this.detailsPlanNum.queryTime = moment(data).format('yyyy-MM-DD')
  909. },
  910. // 事故单 单号 弹框
  911. accidentListCustomCell(record) {
  912. return {
  913. on: {
  914. click: event => {
  915. // this.$router.push({path:'http://localhost:3000/#/IncidentTicketModalDetail'})
  916. // console.log('this:', this)
  917. // // 调用【面料损耗表】中的【事故单】弹框
  918. // this.$refs.accidentListModal.accidentListModVis = true
  919. // this.$refs.accidentListModal.accidentList = record
  920. }
  921. }
  922. }
  923. },
  924. number(data1,data2){
  925. this.detailsPlanNum.fabriccostNotincludestax = data1
  926. this.detailsPlanNum.excipiencostNotincludestax = data2
  927. },
  928. // father 方法
  929. aa() {},
  930. bb() {},
  931. cc() {}
  932. },
  933. computed: {
  934. importExcelUrl: function() {
  935. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  936. },
  937. },
  938. mounted() {}
  939. }
  940. </script>
  941. <style lang="less" scoped>
  942. @import '~@assets/less/common.less';
  943. @import '~@assets/less/overwriter.less';
  944. /deep/ .ant-table-thead > tr > th {
  945. text-align: center;
  946. // font-weight: 700;
  947. }
  948. /deep/ .ant-table-tbody {
  949. text-align: center;
  950. }
  951. /deep/ .fontColor .ant-form-item-label > label{
  952. color: red !important;
  953. }
  954. // /deep/ th.replacecolor {
  955. // background-color: #ccc;
  956. // }
  957. // 抽屉里的card样式
  958. // /deep/ .ant-drawer-content {
  959. // background-color: #f0f2f5;
  960. // }
  961. // /deep/ .ant-drawer-body {
  962. // padding: 10px;
  963. // }
  964. /deep/ form :not(.ant-input-group-wrapper) > .ant-input-group, form .ant-input-group-wrapper{
  965. width: 65% !important;
  966. }
  967. /deep/ .ant-input-group{
  968. padding-right: 6px !important;
  969. }
  970. .taxrate{
  971. width: 40%;
  972. }
  973. </style>