cost-allocation-table.vue 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023
  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. this.accidentListData = res.result.syCostAllocationAccidentList //事故单
  527. this.accidentCalculation(this.accidentListData)
  528. // var accidentNum = 0
  529. // this.accidentListData.map(item =>{
  530. // item.id = accidentNum + 1
  531. // accidentNum += 1
  532. // })
  533. this.costPayData = res.result.syCostAllocationCostpayList //支出费用
  534. var num = 0
  535. this.costPayData.map(item =>{
  536. item.id = num + 1
  537. num += 1
  538. })
  539. // tabs 名称集合
  540. this.$refs.unitTabs.tabNameList = res.result.processUnit.split(',')
  541. //所有tabs数据
  542. this.$refs.unitTabs.tabsAllData = res.result.processUnitList
  543. // 页面打开加载的数据
  544. var oneData = this.$refs.unitTabs.tabsAllData[0]
  545. this.$refs.unitTabs.fabData = oneData.syCostAllocationFabricList
  546. this.$refs.unitTabs.fabData.map(item=>{
  547. if(item.remainingQuantitycost!=='' && item.remainingQuantitycost){
  548. item.remainingQuantitycost = item.remainingQuantitycost.toFixed(2)
  549. }
  550. })
  551. this.$refs.unitTabs.ingData = oneData.syCostAllocationIngredientList
  552. this.$refs.unitTabs.shipData = oneData.syCostAllocationShipdetail
  553. this.addAmountIng(oneData.syCostAllocationIngredientList)
  554. this.addAmountCostPay(this.costPayData)
  555. this.addAccident(this.accidentListData)
  556. this.calculation(oneData.syCostAllocationShipdetail)
  557. //合计中面料相关金额
  558. var s=0
  559. oneData.syCostAllocationFabricList.map(item=>{
  560. s+=Number(item.transferCost)
  561. })
  562. // this.$refs.unitTabs.sumInfo.fabricAmount = s.toFixed(3) //合计中的面料总额
  563. this.$refs.unitTabs.sumInfo.fabricAmount = (this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(Number(this.detailsPlanNum.fabriccostIncludestax)).toFixed(2):'' //合计中的面料总额
  564. this.$refs.unitTabs.sumInfo.fabricExcludTax =(Number(this.$refs.unitTabs.sumInfo.fabricAmount)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//合计中的不含税面料总额
  565. this.detailsPlanNum.fabriccostNotincludestax = this.$refs.unitTabs.sumInfo.fabricExcludTax
  566. // this.detailsPlanNum.fabriccostIncludestax = s.toFixed(3) //表头中面料含税总额
  567. // this.detailsPlanNum.fabriccostNotincludestax = (s/1.13).toFixed(3) //表头中面料不含税总额
  568. //合计中辅料相关金额
  569. var s = 0,
  570. v =0
  571. oneData.syCostAllocationIngredientList.map(item=>{
  572. s+=Number(item.priceExcludingtax),
  573. v+=item.rmbAmount?Number(item.rmbAmount):0
  574. })
  575. this.$refs.unitTabs.sumInfo.ingAmount =(v/2).toFixed(2)//辅料金额合计
  576. this.$refs.unitTabs.sumInfo.ingExcludAmount = ((v/2).toFixed(2)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//辅料不含税金额合计
  577. this.detailsPlanNum.excipiencostNotincludestax = this.$refs.unitTabs.sumInfo.ingExcludAmount
  578. //合计中出运明细相关金额
  579. var s =0,
  580. v = 0,
  581. d = 0,
  582. b = 0,
  583. f=0,
  584. e=0
  585. oneData.syCostAllocationShipdetail.map(item=>{
  586. s+=Number(item.exportPrice)
  587. v+=Number(item.shipQuantity)
  588. d+=Number(item.processCost)
  589. b+=Number(item.rmbAmount)
  590. if(item.exchangeRate=='6.888' && item.outdata!=='合计'){
  591. e+=Number(item.processCost)
  592. }else if(item.outdata!=='合计'){
  593. e+=(Number(item.processCost)/1.13)
  594. }
  595. })
  596. this.$refs.unitTabs.sumInfo.exportPriceUSD = (s/2).toFixed(2)//出运美元外销总价
  597. this.detailsPlanNum.usdTotalexportprice = this.$refs.unitTabs.sumInfo.exportPriceUSD //表头-外销总价($)
  598. this.$refs.unitTabs.sumInfo.shipQua =(v/2).toFixed(4)//出货数量合计
  599. this.$refs.unitTabs.sumInfo.shipProcesFees =(d/2).toFixed(2)//出运加工费
  600. this.$refs.unitTabs.sumInfo.exportedAmountRMB =(b/2).toFixed(2)//出运人民币外销金额 f
  601. this.detailsPlanNum.rmbExportamount = this.$refs.unitTabs.sumInfo.exportedAmountRMB //表头-外销总价(¥)
  602. //调整表头格式
  603. this.adjustingHeader()
  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.usdProcesscost=( this.detailsPlanNum.usdProcesscost==''|| !this.detailsPlanNum.usdProcesscost)?'':Number( this.detailsPlanNum.usdProcesscost).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. }else{
  674. this.detailsPlanNum.rmbProcesscost=( this.detailsPlanNum.rmbProcesscost==''|| !this.detailsPlanNum.rmbProcesscost)?'':Number( this.detailsPlanNum.rmbProcesscost).toFixed(2)//加工费(人民币)
  675. }
  676. },
  677. //计算出运明细合计行
  678. calculation(val){
  679. // var average = 0
  680. // val.map(item=>{
  681. // if(item.outdata !=='合计'){
  682. // average += (Number(item.exportUnitPrice)*Number(item.shipQuantity)*Number(item.exchangeRate))
  683. // }
  684. // })
  685. // this.detailsPlanNum.shortvalue = average.toFixed(2)
  686. var shipQuantityAll =0,
  687. // exportUnitPriceALll = 0,
  688. exportPriceAll =0,
  689. rmbAmountAll = 0,
  690. // procesUnitPricermbAll = 0,
  691. // procesUnitPriceusdAll = 0,
  692. processCostAll = 0
  693. val.map(item=>{
  694. if(item.outdata !=='合计'){
  695. shipQuantityAll+=Number(item.shipQuantity)
  696. // exportUnitPriceALll+=Number(item.exportUnitPrice)
  697. exportPriceAll+=Number(item.exportPrice)
  698. rmbAmountAll+=Number(item.rmbAmount)
  699. // procesUnitPricermbAll+=Number(item.procesUnitPricermb)
  700. // procesUnitPriceusdAll+=Number(item.procesUnitPriceusd)
  701. processCostAll+=Number(item.processCost)
  702. }
  703. })
  704. var allObj ={
  705. outdata:'合计',
  706. shipQuantity:shipQuantityAll.toFixed(3),
  707. // exportUnitPrice:exportUnitPriceALll.toFixed(3),
  708. exportPrice:exportPriceAll.toFixed(3),
  709. rmbAmount:rmbAmountAll.toFixed(3),
  710. // procesUnitPricermb:procesUnitPricermbAll.toFixed(3),
  711. // procesUnitPriceusd:procesUnitPriceusdAll.toFixed(3),
  712. processCost:processCostAll.toFixed(3)
  713. }
  714. // this.detailsPlanNum.salesordersLocaltotal = rmbAmountAll.toFixed(2)
  715. //发运明细-合计行
  716. if(this.$refs.unitTabs.shipData.length!==0 ){
  717. if(this.$refs.unitTabs.shipData[this.$refs.unitTabs.shipData.length-1].outdata=='合计'){
  718. this.$refs.unitTabs.shipData.pop()
  719. }
  720. this.$refs.unitTabs.shipData.push(allObj)
  721. }
  722. this.$refs.unitTabs.shipData.map(item=>{
  723. item.shipQuantity = Number(item.shipQuantity)
  724. item.exportUnitPrice = Number(item.exportUnitPrice)
  725. item.exportPrice = Number(item.exportPrice)
  726. item.rmbAmount = Number(item.rmbAmount)
  727. item.procesUnitPricermb = Number(item.procesUnitPricermb)
  728. item.procesUnitPriceusd = Number(item.procesUnitPriceusd)
  729. item.processCost = Number(item.processCost)
  730. })
  731. },
  732. //辅料中的合计行
  733. addAmountIng(val){
  734. var
  735. transferCostAll =0,
  736. rmbAmountAll = 0,
  737. usdAmountAll = 0,
  738. priceExcludingtaxAll = 0
  739. val.map(item=>{
  740. if(item.goodsName!=='合计'){
  741. transferCostAll+=Number(item.transferCost)
  742. rmbAmountAll+=item.rmbAmount?Number(item.rmbAmount):0
  743. usdAmountAll+=item.usdAmount?Number(item.usdAmount):0
  744. priceExcludingtaxAll+=item.priceExcludingtax?Number(item.priceExcludingtax):0
  745. }
  746. })
  747. var allObj ={
  748. goodsName:'合计',
  749. transferCost:transferCostAll,
  750. rmbAmount:rmbAmountAll,
  751. usdAmount:usdAmountAll,
  752. priceExcludingtax:priceExcludingtaxAll,
  753. ingredientsTransferQuantity:'',
  754. ingredientsRemainingQuantity:''
  755. }
  756. if(this.$refs.unitTabs.ingData.length!==0 ){
  757. if(this.$refs.unitTabs.ingData[this.$refs.unitTabs.ingData.length-1].goodsName=='合计'){this.$refs.unitTabs.ingData.pop()}
  758. this.$refs.unitTabs.ingData.push(allObj)
  759. }
  760. if(rmbAmountAll == usdAmountAll){
  761. this.detailsPlanNum.excipiencostIncludestaxUsd = 0
  762. }else{
  763. this.detailsPlanNum.excipiencostIncludestaxUsd = usdAmountAll.toFixed(2)
  764. }
  765. },
  766. //事故单合计行
  767. addAccident(val){
  768. var amountAll=0,
  769. amountrmbAll=0
  770. val.map(item=>{
  771. if(item.accidentUndertaker!=='合计'){
  772. amountAll+=Number(item.amount)
  773. amountrmbAll+=Number(item.amountrmb)
  774. }
  775. })
  776. var allObj={
  777. accidentUndertaker:'合计',
  778. amount:amountAll,
  779. amountrmb:amountrmbAll
  780. }
  781. if(this.accidentListData.length!==0 ){
  782. if(this.accidentListData[this.accidentListData.length-1].accidentUndertaker=='合计'){this.accidentListData.pop()}
  783. this.accidentListData.push(allObj)
  784. }
  785. },
  786. //费用支出合计行
  787. addAmountCostPay(val){
  788. var disbursedLocalmoneyALL=0,
  789. disbursedOriginalmoneyALL=0,
  790. shuiemoneyAll = 0
  791. val.map(item=>{
  792. if(item.setNo!=='合计'){
  793. disbursedLocalmoneyALL+=Number(item.disbursedLocalmoney)
  794. disbursedOriginalmoneyALL+=Number(item.disbursedOriginalmoney)
  795. shuiemoneyAll+=Number(item.shuiemoney)
  796. }
  797. })
  798. var obj={
  799. setNo:'合计',
  800. disbursedLocalmoney:disbursedLocalmoneyALL,
  801. disbursedOriginalmoney:disbursedOriginalmoneyALL,
  802. shuiemoney:shuiemoneyAll.toFixed(3),
  803. iNatMoney:(disbursedLocalmoneyALL+shuiemoneyAll)
  804. }
  805. if(this.costPayData.length!==0){
  806. if(this.costPayData[this.costPayData.length-1].setNo=='合计'){this.costPayData.pop()}
  807. this.costPayData.push(obj)
  808. }
  809. },
  810. daYin(){
  811. this.showSelect = 1
  812. this.$nextTick(() => {
  813. const html = window.document.getElementById('costAllocationTable').innerHTML
  814. const win = window.open();
  815. const style = '<style>\n'
  816. +'.noprint{display:none}'
  817. // +'.ant-table-body-inner{overflow-x: hidden !important;overflow-y: hidden !important }' //去除滚动条
  818. +'.ant-table-body{overflow-x: hidden !important ;overflow-y: hidden !important}'
  819. +'.ant-table-header {overflow-x: hidden !important ;overflow-y: hidden !important}'
  820. +'.ant-table-fixed-left{display: none !important}'
  821. +'.ant-tabs-nav-container{display: none !important}'
  822. +'.kk{display:flex;flex-wrap: wrap}' //主要信息并排
  823. +'.ant-col-sm-8{width:40%;margin-bottom: 6px;}'
  824. +'.ant-form-item-label{width:55%;font-size: 12px;}'
  825. +'.ant-form-item-children{font-size: 12px}'
  826. +'.ant-card-head-title{font-weight: bold;font-size: 0.67em;margin-bottom: 9px;}'
  827. +'.ant-form-item-control-wrapper{width:100%}'
  828. +'.ant-input{width:100%}'
  829. +'.ant-form-item{display:flex}'
  830. + 'table{width: 100% !important;border-collapse: collapse;border-spacing: 0;overflow-x:hidden;}\n'
  831. + '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'
  832. +'.ant-table-row-cell-break-word{width:5% !important}'
  833. + 'th{color: #333}\n'
  834. + 'a{color: #666; text-decoration:none;}\n'
  835. + '</style>';
  836. win.document.write(style+html);
  837. win.focus();
  838. win.print();
  839. win.close();
  840. this.showSelect = 0
  841. })
  842. },
  843. //该表税率
  844. changeTaxrate(){
  845. this.$refs.unitTabs.changeTaxrate(this.detailsPlanNum.taxrate)
  846. },
  847. //计算事故单美元金额和事故单人民币金额
  848. accidentCalculation(val){
  849. var usaMoney = 0,
  850. rmbMoney = 0
  851. val.map(item=>{
  852. if(item.accidentType=='应补' && item.amount!==''&&item.amount&&item.amount!=='0'){
  853. item.amount=Number(item.amount)*(-1)
  854. }else if(item.accidentType=='应补' && item.amountrmb!==''&&item.amountrmb&&item.amountrmb!=='0'){
  855. item.amountrmb = Number(item.amountrmb)*(-1)
  856. }
  857. usaMoney += Number(item.amount),
  858. rmbMoney+=Number(item.amountrmb)
  859. })
  860. this.detailsPlanNum.accidentUsdamount = usaMoney.toFixed(2)
  861. this.detailsPlanNum.accidentcnyAmount = rmbMoney.toFixed(2)
  862. },
  863. // 页面 保存
  864. save() {
  865. console.log('点击保存')
  866. this.isDisabled = true
  867. setTimeout(() => {
  868. let that = this
  869. that.isDisabled = false
  870. }, 3000)
  871. // if (this.detailsPlanNum.remarks) {
  872. // 保存 部分信息
  873. var halfInfo = {}
  874. // halfInfo.planNum = this.detailsPlanNum.planNum
  875. // halfInfo.remarks = this.detailsPlanNum.remarks
  876. // halfInfo.billstatus = '1'
  877. // console.log(halfInfo.planNum, halfInfo.remarks, halfInfo.billstatus)
  878. // var planNum = this.detailsPlanNum.planNum,
  879. var json = this.detailsPlanNum
  880. json.outdata=moment(json.outdata).format('YYYY-MM-DD hh:mm:ss')
  881. addHalfInfo(json).then(res => {
  882. this.isDisabled = false
  883. if (res.success) {
  884. console.log('保存的部分信息', halfInfo)
  885. this.$message.success('保存成功')
  886. halfInfo = {}
  887. }else{
  888. this.$message.error(res.message);
  889. }
  890. })
  891. // } else {
  892. // this.$message.error('备注不能为空')
  893. // }
  894. },
  895. // 主表:人民币费用支出 弹框
  896. mainTableExpenseCNY() {
  897. console.log('点击:主表人民币费用支出')
  898. this.$refs.mainTableExpenseCNYModal.mainTableExpenseCNYModVis = true
  899. this.$refs.mainTableExpenseCNYModal.mainTableExpenseCNYData = this.costPayData
  900. this.$refs.mainTableExpenseCNYModal.fixedData = this.costPayData
  901. },
  902. // 主表:美元费用支出 弹框
  903. mainTableExpenseUSD() {
  904. console.log('点击:主表美元费用支出')
  905. this.$refs.mainTableExpenseUSDModal.mainTableExpenseUSDModVis = true
  906. this.$refs.mainTableExpenseUSDModal.mainTableExpenseUSDData = this.costPayData
  907. this.$refs.mainTableExpenseUSDModal.fixedData = this.costPayData
  908. },
  909. orderDataChange(data){
  910. this.detailsPlanNum.queryTime = moment(data).format('yyyy-MM-DD')
  911. },
  912. // 事故单 单号 弹框
  913. accidentListCustomCell(record) {
  914. return {
  915. on: {
  916. click: event => {
  917. // this.$router.push({path:'http://localhost:3000/#/IncidentTicketModalDetail'})
  918. // console.log('this:', this)
  919. // // 调用【面料损耗表】中的【事故单】弹框
  920. // this.$refs.accidentListModal.accidentListModVis = true
  921. // this.$refs.accidentListModal.accidentList = record
  922. }
  923. }
  924. }
  925. },
  926. number(data1,data2){
  927. this.detailsPlanNum.fabriccostNotincludestax = data1
  928. this.detailsPlanNum.excipiencostNotincludestax = data2
  929. },
  930. // father 方法
  931. aa() {},
  932. bb() {},
  933. cc() {}
  934. },
  935. computed: {
  936. importExcelUrl: function() {
  937. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  938. },
  939. },
  940. mounted() {}
  941. }
  942. </script>
  943. <style lang="less" scoped>
  944. @import '~@assets/less/common.less';
  945. @import '~@assets/less/overwriter.less';
  946. /deep/ .ant-table-thead > tr > th {
  947. text-align: center;
  948. // font-weight: 700;
  949. }
  950. /deep/ .ant-table-tbody {
  951. text-align: center;
  952. }
  953. /deep/ .fontColor .ant-form-item-label > label{
  954. color: red !important;
  955. }
  956. // /deep/ th.replacecolor {
  957. // background-color: #ccc;
  958. // }
  959. // 抽屉里的card样式
  960. // /deep/ .ant-drawer-content {
  961. // background-color: #f0f2f5;
  962. // }
  963. // /deep/ .ant-drawer-body {
  964. // padding: 10px;
  965. // }
  966. /deep/ form :not(.ant-input-group-wrapper) > .ant-input-group, form .ant-input-group-wrapper{
  967. width: 65% !important;
  968. }
  969. /deep/ .ant-input-group{
  970. padding-right: 6px !important;
  971. }
  972. .taxrate{
  973. width: 40%;
  974. }
  975. </style>