tabs.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  1. <template>
  2. <!-- 报表 - tabs -->
  3. <!-- default-active-key="1"-->
  4. <div id="unitTabs">
  5. <a-tabs @change="tabsCallback" :default-active-key="activeKey">
  6. <a-tab-pane v-for="(item, index) in tabNameList" :key="index" :tab="item">
  7. <!-- tabs 面料 -->
  8. <div :class="[(fabData.length==0?'noprint': '')]">
  9. <h6 class="table-title">面料</h6>
  10. <a-table
  11. rowKey="(item)=>item.id"
  12. :loading="loading"
  13. :columns="fabColumns"
  14. :data-source="fabData"
  15. bordered
  16. :pagination="false"
  17. :scroll="{ x: 1500 }"
  18. >
  19. <!-- 表头 -->
  20. <span slot="transferCostTitle" class="fontColor">
  21. 转入成本
  22. </span>
  23. <span slot="remainingQuantitycostTitle" class="fontColor">
  24. 余下数量的成本
  25. </span>
  26. <!-- 面料 -转入数量 弹框-->
  27. <span slot="fabInQuaSlot" slot-scope="text">
  28. <a>{{ Number(text).toFixed(4)}}</a>
  29. </span>
  30. <!-- 余下数量-->
  31. <span slot="fabRemaQuaSlot" slot-scope="text">
  32. <a>{{ Number(text).toFixed(4) }}</a>
  33. </span>
  34. <!-- 余下数量-->
  35. <span slot="pilosityFewerSlot" slot-scope="text">
  36. <a>{{ Number(text).toFixed(4) }}</a>
  37. </span>
  38. <!-- 备注 -->
  39. <span slot="remarks" slot-scope="text,record">
  40. <!-- <a-input placeholder="请输入" v-model="record.remarks" v-show='showSelect==0'/> -->
  41. <a @click="inputRemark(record,'面料')" v-show='showSelect==0'> 备注</a>
  42. <span v-show='showSelect==1'>{{ text }}</span>
  43. </span>
  44. </a-table>
  45. </div>
  46. <!-- tabs 辅料 -->
  47. <div style="margin:30px 0" :class="[(ingData.length==0?'noprint': '')]">
  48. <h6 class="table-title">辅料</h6>
  49. <a-table
  50. rowKey="(item)=>item.goodsName"
  51. :loading="loading"
  52. :columns="ingColumns"
  53. :data-source="ingData"
  54. bordered
  55. :pagination="false"
  56. :scroll="{ x: 1500 }"
  57. >
  58. <!-- 表头 -->
  59. <span slot="transferCostTitle" class="fontColor">
  60. 转入成本
  61. </span>
  62. <!--辅料-转入数量 弹框-->
  63. <span slot="ingInQuaSlot" slot-scope="text">
  64. <a v-if="text!==''">{{ Number(text).toFixed(4) }}</a>
  65. </span>
  66. <!--辅料-余下数量 弹框-->
  67. <span slot="ingRemQuaSlot" slot-scope="text">
  68. <a v-if="text!==''">{{ Number(text).toFixed(4) }}</a>
  69. </span>
  70. <!-- 备注 -->
  71. <span slot="remarks" slot-scope="text,record">
  72. <!-- <a-input placeholder="请输入" v-model="record.remarks" v-show='showSelect==0'/> -->
  73. <a @click="inputRemark(record,'辅料')" v-show="showSelect==0&&text!=='heji'"> 备注</a>
  74. <span v-show='showSelect==1'>{{ text }}</span>
  75. </span>
  76. </a-table>
  77. </div>
  78. <!-- tabs 发运明细 :scroll="{ x: 1500 }"-->
  79. <div :class="[(shipData.length==0?'noprint': '')]">
  80. <h6 class="table-title">发运明细</h6>
  81. <a-table
  82. rowKey="(item)=>item.id"
  83. :loading="loading"
  84. :columns="shipColumns"
  85. :data-source="shipData"
  86. bordered
  87. :pagination="false"
  88. :scroll="{ x: 1500 }"
  89. ref="table"
  90. class="shipData"
  91. >
  92. </a-table>
  93. </div>
  94. <!-- tabs 合计 信息 -->
  95. <div style="marginTop:30px;">
  96. <h6 class="table-title">合计信息</h6>
  97. <div style="border: 1px solid #e8e8e8;padding: 20px 20px 0 20px;">
  98. <a-row :gutter="24">
  99. <div class="table-page-search-wrapper">
  100. <a-form layout="inline" class="kk">
  101. <a-col :md="6" :sm="8">
  102. <a-form-item label="出货数量合计" >
  103. <a-input v-model="sumInfo.shipQua" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
  104. <span v-show='showSelect==1'>{{sumInfo.shipQua}}</span>
  105. </a-form-item>
  106. </a-col>
  107. <a-col :md="6" :sm="8">
  108. <a-form-item label="出运美元外销总价" >
  109. <a-input v-model="sumInfo.exportPriceUSD" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
  110. <span v-show='showSelect==1'>{{sumInfo.exportPriceUSD}}</span>
  111. </a-form-item>
  112. </a-col>
  113. <a-col :md="6" :sm="8">
  114. <a-form-item label="出运人民币外销金额">
  115. <a-input v-model="sumInfo.exportedAmountRMB" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
  116. <span v-show='showSelect==1'>{{sumInfo.exportedAmountRMB}}</span>
  117. </a-form-item>
  118. </a-col>
  119. <a-col :md="6" :sm="8">
  120. <a-form-item label="成本合计金额">
  121. <a-input v-model="sumInfo.amountTotal" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
  122. <span v-show='showSelect==1'>{{sumInfo.amountTotal}}</span>
  123. </a-form-item>
  124. </a-col>
  125. <a-col :md="6" :sm="8">
  126. <a-form-item label="面料金额合计" >
  127. <a-input v-model="sumInfo.fabricAmount" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
  128. <span v-show='showSelect==1'>{{sumInfo.fabricAmount}}</span>
  129. </a-form-item>
  130. </a-col>
  131. <a-col :md="6" :sm="8">
  132. <a-form-item label="辅料金额合计">
  133. <a-input v-model="sumInfo.ingAmount" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
  134. <span v-show='showSelect==1'>{{sumInfo.ingAmount}}</span>
  135. </a-form-item>
  136. </a-col>
  137. <a-col :md="6" :sm="8">
  138. <a-form-item label="出运加工费">
  139. <a-input v-model="sumInfo.shipProcesFees" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
  140. <span v-show='showSelect==1'>{{sumInfo.shipProcesFees}}</span>
  141. </a-form-item>
  142. </a-col>
  143. <a-col :md="6" :sm="8" class="noprint">
  144. <a-form-item ></a-form-item>
  145. </a-col>
  146. <a-col :md="6" :sm="8">
  147. <a-form-item label="面料不含税金额合计">
  148. <a-input v-model="sumInfo.fabricExcludTax" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
  149. <span v-show='showSelect==1'>{{sumInfo.fabricExcludTax}}</span>
  150. </a-form-item>
  151. </a-col>
  152. <a-col :md="6" :sm="8">
  153. <a-form-item label="辅料不含税金额合计" >
  154. <a-input v-model="sumInfo.ingExcludAmount" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
  155. <span v-show='showSelect==1'>{{sumInfo.ingExcludAmount}}</span>
  156. </a-form-item>
  157. </a-col>
  158. <a-col :md="6" :sm="8">
  159. <a-form-item label="出运不含税加工费金额" >
  160. <a-input v-model="sumInfo.excludingTaxProcessing" v-show='showSelect==0' :readOnly="showAll=='yes'"></a-input>
  161. <span v-show='showSelect==1'>{{sumInfo.excludingTaxProcessing}}</span>
  162. </a-form-item>
  163. </a-col>
  164. </a-form>
  165. </div>
  166. </a-row>
  167. </div>
  168. </div>
  169. </a-tab-pane>
  170. </a-tabs>
  171. <!-- tabs内弹框 -->
  172. <div>
  173. <!-- 面料 转入数量 -->
  174. <fabInQua-modal ref="fabInQuaModal" :father="aa" :planNum="this.planNum" @close="closeFabInQua"></fabInQua-modal>
  175. <!-- 余下数量 -->
  176. <fabRemQua-modal ref="fabRemQuaModal" :father="bb" :planNum="this.planNum" ></fabRemQua-modal>
  177. <!-- 辅料 转入数量 -->
  178. <ingInQua-modal ref="ingInQuaModal" :father="cc" :planNum="this.planNum" @close="closeIngInQua"></ingInQua-modal>
  179. <!-- 余下数量 -->
  180. <ingRemQua-modal ref="ingRemQuaModal" :father="bb" :planNum="this.planNum"></ingRemQua-modal>
  181. <pilosity-fewer-list-modal ref="pilosityFewerListModal" :planNum="this.planNum"></pilosity-fewer-list-modal>
  182. <submit-information ref="submitInformation" @close="closeRemark" :showAll="showAll=='yes'?'yes':'no'"></submit-information>
  183. </div>
  184. </div>
  185. </template>
  186. <script>
  187. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  188. import JEllipsis from '@/components/jeecg/JEllipsis'
  189. import moment from 'moment'
  190. import fabInQuaModal from '@views/cost-allocation-total/modal/fabInQuaModal.vue'
  191. import fabRemQuaModal from '@views/cost-allocation-total/modal/fabRemQuaModal.vue'
  192. import ingInQuaModal from '@views/cost-allocation-total/modal/ingInQuaModal.vue'
  193. import ingRemQuaModal from '@views/cost-allocation-total/modal/ingRemQuaModal.vue'
  194. import pilosityFewerListModal from '@views/cost-allocation-total/modal/pilosityFewerModal.vue'
  195. import submitInformation from '@views/reportForms/cost-allocation-table/submitInformation.vue' // tabs组件
  196. export default {
  197. name: 'UnitTabs', // Tabs 详情
  198. mixins: [JeecgListMixin],
  199. components: {
  200. JEllipsis,
  201. moment,
  202. fabInQuaModal, // 面料 转入数量
  203. fabRemQuaModal, // 余下数量
  204. ingInQuaModal, // 辅料 转入数量
  205. ingRemQuaModal ,// 余下数量
  206. pilosityFewerListModal,//多发少发
  207. submitInformation
  208. },
  209. data() {
  210. // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
  211. return {
  212. // 面料
  213. fabColumns: [
  214. {
  215. title: '序号',
  216. width: '6%',
  217. dataIndex: 'index',
  218. key: 'index',
  219. customRender: (text, record, index) => `${index + 1}`,
  220. className: 'replacecolor'
  221. },
  222. { title: '货物名称', width: '10%', dataIndex: 'goodsName', className: 'replacecolor' },
  223. {
  224. title: '转入数量',
  225. dataIndex: 'fabrictransferQuantity',
  226. width: '8%',
  227. className: 'replacecolor',
  228. customCell: this.fabQuaCustomCell,
  229. scopedSlots: { customRender: 'fabInQuaSlot' },
  230. },
  231. {
  232. title: '转入成本',
  233. dataIndex: 'transferCost',
  234. width: '8%',
  235. className: 'replacecolor',
  236. customRender: (text, record, index) => {
  237. if(text!==''&&text!==undefined&&text!==null){
  238. return Number(text).toFixed(2)
  239. }
  240. },
  241. // slots:{title:'transferCostTitle'} ,
  242. },
  243. {
  244. title: '单耗/件',
  245. dataIndex: 'unitConsumption',
  246. width: '9%',
  247. className: 'replacecolor',
  248. customRender: (text, record, index) => {
  249. if(text!==''&&text){
  250. return Number(text).toFixed(4)
  251. }
  252. },
  253. },
  254. {
  255. title: '使用数量',
  256. dataIndex: 'usageQuantity',
  257. width: '9%',
  258. className: 'replacecolor' ,
  259. customRender: (text, record, index) => {
  260. if(text!==''&&text){
  261. return Number(text).toFixed(4)
  262. }
  263. },
  264. },
  265. {
  266. title: '计划数量',
  267. dataIndex: 'planQuantity',
  268. width: '9%',
  269. className: 'replacecolor' ,
  270. customRender: (text, record, index) => {
  271. if(text!==''&&text){
  272. return Number(text).toFixed(4)
  273. }
  274. },
  275. },
  276. {
  277. title: '购入数量',
  278. dataIndex: 'purchaseQuantity',
  279. width: '6%',
  280. className: 'replacecolor',
  281. customRender: (text, record, index) => {
  282. if(text!==''&&text){
  283. return Number(text).toFixed(4)
  284. }
  285. },
  286. },
  287. {
  288. title: '余下数量',
  289. dataIndex: 'fabricremainingQuantity',
  290. width: '6%',
  291. className: 'replacecolor',
  292. customCell: this.fabRemQuaCustomCell,
  293. scopedSlots: { customRender: 'fabRemaQuaSlot' }
  294. },
  295. {
  296. title: '损耗',
  297. dataIndex: 'loss',
  298. width: '6%',
  299. className: 'replacecolor',
  300. customRender: (text, record, index) => {
  301. if(text!==''&&text){
  302. return Number(text).toFixed(4)
  303. }
  304. },
  305. },
  306. {
  307. title: '余下数量的成本',
  308. dataIndex: 'remainingQuantitycost',
  309. width: '9%',
  310. className: 'replacecolor',
  311. customRender: (text, record, index) => {
  312. if(text!==''&&text){
  313. return Number(text).toFixed(2)
  314. }
  315. },
  316. // slots:{title:'remainingQuantitycostTitle'} ,
  317. },
  318. {
  319. title: '多发少发',
  320. dataIndex: 'pilosityFewer',
  321. width: '9%',
  322. className: 'replacecolor',
  323. customCell: this.pilosityFewerCell,
  324. scopedSlots: { customRender: 'pilosityFewerSlot' }
  325. // customRender: (text, record, index) => {
  326. // if(text!==''&&text){
  327. // return Number(text).toFixed(4)
  328. // }
  329. // },
  330. },
  331. {
  332. title: '备注',
  333. dataIndex: 'remarks',
  334. scopedSlots: { customRender: 'remarks' },
  335. width: '8%',
  336. className: 'replacecolor'
  337. }
  338. ],
  339. fabData: [],
  340. // 辅料
  341. ingColumns: [
  342. {
  343. title: '序号',
  344. width: '6%',
  345. dataIndex: 'index',
  346. key: 'index',
  347. // fixed: 'left',
  348. customRender: (text, record, index) =>{
  349. if(record.goodsName!=='合计'){
  350. return index + 1
  351. }else{
  352. return ''
  353. }
  354. },
  355. className: 'replacecolor'
  356. },
  357. { title: '货物名称', width: '12%', dataIndex: 'goodsName', className: 'replacecolor' },
  358. {
  359. title: '转入数量',
  360. dataIndex: 'ingredientsTransferQuantity',
  361. width: '6%',
  362. className: 'replacecolor',
  363. customCell: this.ingInQuaCustomCell,
  364. scopedSlots: { customRender: 'ingInQuaSlot' }
  365. },
  366. {
  367. title: '转入成本',
  368. dataIndex: 'transferCost',
  369. width: '6%',
  370. className: 'replacecolor',
  371. customRender: (text, record, index) => {
  372. if(text!==''&&text!==undefined&&text!==null){
  373. return Number(text).toFixed(2)
  374. }else{
  375. var re = ''
  376. return re
  377. }
  378. },
  379. // slots:{title:'transferCostTitle'} ,
  380. },
  381. {
  382. title: '使用数量',
  383. dataIndex: 'usageQuantity',
  384. width: '8%',
  385. className: 'replacecolor',
  386. customRender: (text, record, index) => {
  387. if(text!==''&&text){
  388. return Number(text).toFixed(4)
  389. }
  390. },
  391. },
  392. {
  393. title: '购入数量',
  394. dataIndex: 'purchaseQuantity',
  395. width: '8%',
  396. className: 'replacecolor',
  397. customRender: (text, record, index) => {
  398. if(text!==''&&text){
  399. return Number(text).toFixed(4)
  400. }
  401. },
  402. },
  403. {
  404. title: '余下数量',
  405. dataIndex: 'ingredientsRemainingQuantity',
  406. width: '6%',
  407. className: 'replacecolor',
  408. customCell: this.ingRemQuaCustomCell,
  409. scopedSlots: { customRender: 'ingRemQuaSlot' }
  410. },
  411. {
  412. title: '损耗',
  413. dataIndex: 'loss',
  414. width: '6%',
  415. className: 'replacecolor',
  416. customRender: (text, record, index) => {
  417. if(text!==''&&text){
  418. return Number(text).toFixed(4)
  419. }
  420. },
  421. },
  422. {
  423. title: '人民币金额',
  424. dataIndex: 'rmbAmount',
  425. width: '6%',
  426. className: 'replacecolor',
  427. customRender: (text, record, index) => {
  428. if(text!==''&&text){
  429. return Number(text).toFixed(2)
  430. }
  431. },
  432. },
  433. {
  434. title: '美元金额',
  435. dataIndex: 'usdAmount',
  436. width: '6%',
  437. className: 'replacecolor',
  438. customRender: (text, record, index) => {
  439. if (record.rmbAmount == record.usdAmount)
  440. return "";
  441. else
  442. return Number(record.usdAmount).toFixed(2);
  443. }
  444. },
  445. {
  446. title: '不含税金额',
  447. dataIndex: 'priceExcludingtax',
  448. width: '6%',
  449. className: 'replacecolor',
  450. customRender: (text, record, index) => {
  451. if(text!==''&&text){
  452. return Number(text).toFixed(2)
  453. }
  454. },
  455. },
  456. // {
  457. // title: '转出率',
  458. // dataIndex: 'transferOutrate',
  459. // width: 120,
  460. // className: 'replacecolor'
  461. // },
  462. // {
  463. // title: '进项税转出',
  464. // dataIndex: 'inputtaxTransferout',
  465. // width: 160,
  466. // className: 'replacecolor'
  467. // },
  468. {
  469. title: '用量',
  470. dataIndex: 'dosage',
  471. width: '6%',
  472. className: 'replacecolor',
  473. customRender: (text, record, index) => {
  474. if(text!==''&&text){
  475. return Number(text).toFixed(4)
  476. }
  477. },
  478. },
  479. {
  480. title: '供应商',
  481. dataIndex: 'supper',
  482. width: '8%',
  483. className: 'replacecolor'
  484. },
  485. {
  486. title: '备注',
  487. dataIndex: 'remarks',
  488. scopedSlots: { customRender: 'remarks' },
  489. width: '8%',
  490. className: 'replacecolor'
  491. }
  492. ],
  493. ingData: [],
  494. // 发运明细
  495. shipColumns: [
  496. {
  497. title: '序号',
  498. width: '6%',
  499. dataIndex: 'index',
  500. key: 'index',
  501. fixed: 'left',
  502. customRender: (text, record, index) => `${index + 1}`,
  503. className: 'replacecolor'
  504. },
  505. { title: '发票号码', width: '15%', dataIndex: 'invoiceNum', fixed: 'left', className: 'replacecolor' },
  506. {
  507. title: '出运日期',
  508. dataIndex: 'outdata',
  509. width: '8%',
  510. fixed: 'left',
  511. className: 'replacecolor'
  512. },
  513. {
  514. title: '小po',
  515. width: '7%',
  516. dataIndex: 'smallPo',
  517. fixed: 'left',
  518. className: 'replacecolor'
  519. },
  520. {
  521. title: '汇率',
  522. dataIndex: 'exchangeRate',
  523. width: '8%',
  524. className: 'replacecolor'
  525. },
  526. { title: '订单号', dataIndex: 'orderNum', width: '10%', className: 'replacecolor' },
  527. {
  528. title: '产品款号',
  529. dataIndex: 'poStyleNum',
  530. width: '9%',
  531. className: 'replacecolor'
  532. },
  533. {
  534. title: '出货数量',
  535. dataIndex: 'shipQuantity',
  536. width: '9%',
  537. className: 'replacecolor',
  538. customRender: (text, record, index) => {
  539. if(text!==''&&text){
  540. return Number(text).toFixed(4)
  541. }
  542. },
  543. },
  544. {
  545. title: '外销单价',
  546. dataIndex: 'exportUnitPrice',
  547. width: '9%',
  548. className: 'replacecolor',
  549. customRender: (text, record, index) => {
  550. if(text!==''&&text){
  551. return Number(text).toFixed(4)
  552. }
  553. },
  554. },
  555. {
  556. title: '外销总价',
  557. dataIndex: 'exportPrice',
  558. width: '9%',
  559. className: 'replacecolor',
  560. customRender: (text, record, index) => {
  561. if(text!==''&&text){
  562. return Number(text).toFixed(2)
  563. }
  564. },
  565. },
  566. {
  567. title: '人民币金额',
  568. dataIndex: 'rmbAmount',
  569. width: '9%',
  570. className: 'replacecolor',
  571. customRender: (text, record, index) => {
  572. if(text!==''&&text){
  573. return Number(text).toFixed(2)
  574. }
  575. },
  576. },
  577. {
  578. title: '加工单价(人民币)',
  579. dataIndex: 'procesUnitPricermb',
  580. width: '9%',
  581. className: 'replacecolor',
  582. customRender: (text, record, index) => {
  583. if(text!==''&&text){
  584. return Number(text).toFixed(4)
  585. }
  586. },
  587. },
  588. {
  589. title: '加工单价(美元)',
  590. dataIndex: 'procesUnitPriceusd',
  591. width: '9%',
  592. className: 'replacecolor',
  593. customRender: (text, record, index) => {
  594. if (record.procesUnitPricermb == record.procesUnitPriceusd)
  595. return "";
  596. else
  597. return record.procesUnitPriceusd?Number(record.procesUnitPriceusd).toFixed(4):'';
  598. }
  599. },
  600. {
  601. title: '加工费(人民币)',
  602. dataIndex: 'processCost',
  603. width: '8%',
  604. className: 'replacecolor',
  605. customRender: (text, record, index) => {
  606. if(text!==''&&text){
  607. return Number(text).toFixed(4)
  608. }
  609. },
  610. }
  611. ],
  612. shipData: [],
  613. tabsAllData: [], //tabs所有数据集合
  614. tabNameList: [], //tabs数组集合
  615. activeKey: '0',
  616. mList:[],
  617. fList:[],
  618. sumInfo: {} //合计对象
  619. }
  620. },
  621. props: {
  622. showSelect: {
  623. type: String,
  624. default: null
  625. },
  626. showAll: {
  627. type: String,
  628. default: null
  629. },
  630. planNum:{
  631. type: String,
  632. default: null
  633. }
  634. },
  635. created() {},
  636. methods: {
  637. changeTaxrate(data){
  638. this.sumInfo.fabricExcludTax =''
  639. this.sumInfo.ingExcludAmount=''
  640. this.sumInfo.amountTotal=''
  641. this.sumInfo.fabricExcludTax =(Number(this.sumInfo.fabricAmount)/(1+(Number(data)/100))).toFixed(2)//合计中的不含税面料总额
  642. this.sumInfo.ingExcludAmount = (Number(this.sumInfo.ingAmount).toFixed(2)/(1+(Number(data)/100))).toFixed(2)//辅料不含税金额合计
  643. this.sumInfo.amountTotal = (Number(this.sumInfo.fabricAmount)+Number(this.sumInfo.ingAmount)+Number( this.sumInfo.shipProcesFees)).toFixed(2)//合计金额
  644. if(Number(this.shipData[0].procesUnitPriceusd)>0){
  645. this.sumInfo.excludingTaxProcessing =this.sumInfo.shipProcesFees//出运不含税加工费-合计信息
  646. }else{
  647. this.sumInfo.excludingTaxProcessing =(Number(this.sumInfo.shipProcesFees).toFixed(2)/(1+(Number(data)/100))).toFixed(2)//出运不含税加工费-合计信息
  648. }
  649. this.$forceUpdate()
  650. this.$emit('number',this.sumInfo.fabricExcludTax,this.sumInfo.ingExcludAmount)
  651. },
  652. Refresh(){
  653. setTimeout(()=> {
  654. this.$forceUpdate();
  655. // this.$refs.table.doLayout()
  656. },200)
  657. },
  658. tabsCallback(key) {
  659. this.activeKey = key
  660. // console.log('点击的是', this.activeKey)
  661. if (key == 0) {
  662. var oneData = this.tabsAllData[0]
  663. this.fabData = oneData.syCostAllocationFabricList
  664. this.ingData = oneData.syCostAllocationIngredientList
  665. this.shipData = oneData.syCostAllocationShipdetailList
  666. }
  667. if (key == 1) {
  668. var twoData = this.tabsAllData[1]
  669. this.fabData = twoData.syCostAllocationFabricList
  670. this.ingData = twoData.syCostAllocationIngredientList
  671. this.shipData = twoData.syCostAllocationShipdetailList
  672. }
  673. },
  674. // 面料 -转入数量 弹框
  675. fabQuaCustomCell(record) {
  676. return {
  677. on: {
  678. click: event => {
  679. console.log('面料 - 转入数量')
  680. console.log( this.mList,this.fList)
  681. this.$refs.fabInQuaModal.fabInQuaModVis = true
  682. this.$refs.fabInQuaModal.record = record
  683. record.syTransfers.map(item=>{
  684. if(item.unitCost){
  685. item.unitCost = Number(item.unitCost).toFixed(3)
  686. }
  687. })
  688. this.$refs.fabInQuaModal.data = record.syTransfers
  689. if(this.mList.length!==0){
  690. this.mList.map(item=>{
  691. if(item.goodsName == record.goodsName){
  692. this.$refs.fabInQuaModal.data = item.syTransfers
  693. }
  694. })
  695. }
  696. }
  697. }
  698. }
  699. },
  700. closeFabInQua(data,record){
  701. var all = 0
  702. this.fabData.map(item=>{
  703. if(item.goodsName == record.goodsName){
  704. item.transferCost = data
  705. }
  706. if(item.transferCost&&item.transferCost!==''){
  707. all+=Number(item.transferCost)
  708. }
  709. this.$emit('FabInQua',all)
  710. })
  711. this.$forceUpdate()
  712. },
  713. closeIngInQua(data,record){
  714. this.ingData.map(item=>{
  715. if(item.goodsName == record.goodsName){
  716. item.transferCost = data
  717. }
  718. })
  719. },
  720. // 面料 -余下数量 弹框
  721. fabRemQuaCustomCell(record) {
  722. return {
  723. on: {
  724. click: event => {
  725. console.log('面料 - 余下数量')
  726. this.$refs.fabRemQuaModal.fabRemQuaModVis = true
  727. this.$refs.fabRemQuaModal.data = record.syRemaining
  728. }
  729. }
  730. }
  731. },
  732. //面料-多发少发
  733. pilosityFewerCell(record){
  734. return {
  735. on: {
  736. click: event => {
  737. console.log('面料 - 多发少发')
  738. this.$refs.pilosityFewerListModal.pilosityFewerModVis = true
  739. this.$refs.pilosityFewerListModal.pilosityFewerList = record.pilosityFewerList
  740. }
  741. }
  742. }
  743. },
  744. // 辅料-转入数量 弹框
  745. ingInQuaCustomCell(record) {console.log('辅料 - 转入数量')
  746. return {
  747. on: {
  748. click: event => {
  749. console.log('辅料 - 转入数量')
  750. this.$refs.ingInQuaModal.ingInQuaModVis = true
  751. this.$refs.ingInQuaModal.planNum = this.planNum
  752. this.$refs.ingInQuaModal.record = record
  753. record.syTransfers.map(item=>{
  754. if(item.unitCost){
  755. item.unitCost = (item.unitCost).toFixed(3)
  756. }
  757. })
  758. this.$refs.ingInQuaModal.data = record.syTransfers
  759. if(this.fList.length!==0){
  760. this.fList.map(item=>{
  761. if(item.goodsName == record.goodsName){
  762. this.$refs.ingInQuaModal.data = item.syTransfers
  763. }
  764. })
  765. }
  766. }
  767. }
  768. }
  769. },
  770. // 辅料-余下数量 弹框
  771. ingRemQuaCustomCell(record) {
  772. return {
  773. on: {
  774. click: event => {
  775. console.log('辅料 - 余下数量')
  776. this.$refs.ingRemQuaModal.ingRemQuaModVis = true
  777. this.$refs.ingRemQuaModal.data = record.syRemaining
  778. }
  779. }
  780. }
  781. },
  782. inputRemark(record,data){
  783. this.$refs.submitInformation.remarkModVis = true
  784. this.$refs.submitInformation.value = record.remarks
  785. this.$refs.submitInformation.text = data
  786. this.$refs.submitInformation.father = record
  787. },
  788. closeRemark(value,data,record){
  789. record.remarks=value
  790. }
  791. },
  792. computed: {
  793. // 合计数据
  794. // sumInfoSource() {}
  795. }
  796. }
  797. </script>
  798. <style lang="less" scoped>
  799. @import '~@assets/less/common.less';
  800. @import '~@assets/less/overwriter.less';
  801. /deep/ .ant-table-thead > tr > th {
  802. text-align: center;
  803. // font-weight: 700;
  804. }
  805. /deep/ .ant-table-tbody {
  806. text-align: center;
  807. }
  808. // /deep/ th.replacecolor {
  809. // background-color: #ccc;
  810. // }
  811. //tbas内 小标签
  812. .table-title {
  813. font-weight: 700;
  814. }
  815. .fontColor{
  816. color: red;
  817. }
  818. /deep/ .ant-tabs-nav .ant-tabs-tab-active {
  819. font-size: 18px;
  820. }
  821. /deep/ .ant-tabs-nav .ant-tabs-tab {
  822. font-size: 18px;
  823. }
  824. /deep/ .ant-tabs-nav .ant-tabs-tab {
  825. padding: 0 0 10px 0;
  826. }
  827. /deep/ .fontColor .ant-form-item-label > label{
  828. color: red !important;
  829. }
  830. /deep/.ant-table-fixed{
  831. width:18% !important
  832. }
  833. /deep/.shipData>.ant-spin-nested-loading>.ant-spin-container>.ant-table>.ant-table-content>.ant-table-fixed-left>.ant-table-body-outer>.ant-table-body-inner>.ant-table-fixed>{
  834. width:29% !important
  835. }
  836. </style>