tabs.vue 29 KB

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