costDetailDrawer.vue 44 KB

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