tabs.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893
  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. fixed: 'left',
  501. customRender: (text, record, index) => `${index + 1}`,
  502. className: 'replacecolor'
  503. },
  504. { title: '发票号码', width: '15%', dataIndex: 'invoiceNum', fixed: 'left', className: 'replacecolor' },
  505. {
  506. title: '出运日期',
  507. dataIndex: 'outdata',
  508. width: '8%',
  509. fixed: 'left',
  510. className: 'replacecolor'
  511. },
  512. {
  513. title: '小po',
  514. width: '7%',
  515. dataIndex: 'smallPo',
  516. fixed: 'left',
  517. className: 'replacecolor'
  518. },
  519. {
  520. title: '汇率',
  521. dataIndex: 'exchangeRate',
  522. width: '8%',
  523. className: 'replacecolor'
  524. },
  525. { title: '订单号', dataIndex: 'orderNum', width: '10%', className: 'replacecolor' },
  526. {
  527. title: '产品款号',
  528. dataIndex: 'poStyleNum',
  529. width: '9%',
  530. className: 'replacecolor'
  531. },
  532. {
  533. title: '出货数量',
  534. dataIndex: 'shipQuantity',
  535. width: '9%',
  536. className: 'replacecolor',
  537. customRender: (text, record, index) => {
  538. if(text!==''&&text){
  539. return Number(text).toFixed(4)
  540. }
  541. },
  542. },
  543. {
  544. title: '外销单价',
  545. dataIndex: 'exportUnitPrice',
  546. width: '9%',
  547. className: 'replacecolor',
  548. customRender: (text, record, index) => {
  549. if(text!==''&&text){
  550. return Number(text).toFixed(4)
  551. }
  552. },
  553. },
  554. {
  555. title: '外销总价',
  556. dataIndex: 'exportPrice',
  557. width: '9%',
  558. className: 'replacecolor',
  559. customRender: (text, record, index) => {
  560. if(text!==''&&text){
  561. return Number(text).toFixed(2)
  562. }
  563. },
  564. },
  565. {
  566. title: '人民币金额',
  567. dataIndex: 'rmbAmount',
  568. width: '9%',
  569. className: 'replacecolor',
  570. customRender: (text, record, index) => {
  571. if(text!==''&&text){
  572. return Number(text).toFixed(2)
  573. }
  574. },
  575. },
  576. {
  577. title: '加工单价(人民币)',
  578. dataIndex: 'procesUnitPricermb',
  579. width: '9%',
  580. className: 'replacecolor',
  581. customRender: (text, record, index) => {
  582. if(text!==''&&text){
  583. return Number(text).toFixed(4)
  584. }
  585. },
  586. },
  587. {
  588. title: '加工单价(美元)',
  589. dataIndex: 'procesUnitPriceusd',
  590. width: '9%',
  591. className: 'replacecolor',
  592. customRender: (text, record, index) => {
  593. if (record.procesUnitPricermb == record.procesUnitPriceusd)
  594. return "";
  595. else
  596. return record.procesUnitPriceusd?Number(record.procesUnitPriceusd).toFixed(4):'';
  597. }
  598. },
  599. {
  600. title: '加工费(人民币)',
  601. dataIndex: 'processCost',
  602. width: '8%',
  603. className: 'replacecolor',
  604. customRender: (text, record, index) => {
  605. if(text!==''&&text){
  606. return Number(text).toFixed(4)
  607. }
  608. },
  609. }
  610. ],
  611. shipData: [],
  612. tabsAllData: [], //tabs所有数据集合
  613. tabNameList: [], //tabs数组集合
  614. activeKey: '0',
  615. mList:[],
  616. fList:[],
  617. sumInfo: {} //合计对象
  618. }
  619. },
  620. props: {
  621. showSelect: {
  622. type: String,
  623. default: null
  624. },
  625. showAll: {
  626. type: String,
  627. default: null
  628. },
  629. planNum:{
  630. type: String,
  631. default: null
  632. }
  633. },
  634. created() {},
  635. methods: {
  636. changeTaxrate(data){
  637. this.sumInfo.fabricExcludTax =''
  638. this.sumInfo.ingExcludAmount=''
  639. this.sumInfo.amountTotal=''
  640. this.sumInfo.fabricExcludTax =(Number(this.sumInfo.fabricAmount)/(1+(Number(data)/100))).toFixed(2)//合计中的不含税面料总额
  641. this.sumInfo.ingExcludAmount = (Number(this.sumInfo.ingAmount).toFixed(2)/(1+(Number(data)/100))).toFixed(2)//辅料不含税金额合计
  642. this.sumInfo.amountTotal = (Number(this.sumInfo.fabricAmount)+Number(this.sumInfo.ingAmount)+Number( this.sumInfo.shipProcesFees)).toFixed(2)//合计金额
  643. if(Number(this.shipData[0].procesUnitPriceusd)>0){
  644. this.sumInfo.excludingTaxProcessing =this.sumInfo.shipProcesFees//出运不含税加工费-合计信息
  645. }else{
  646. this.sumInfo.excludingTaxProcessing =(Number(this.sumInfo.shipProcesFees).toFixed(2)/(1+(Number(data)/100))).toFixed(2)//出运不含税加工费-合计信息
  647. }
  648. this.$forceUpdate()
  649. this.$emit('number',this.sumInfo.fabricExcludTax,this.sumInfo.ingExcludAmount)
  650. },
  651. Refresh(){
  652. setTimeout(()=> {
  653. this.$forceUpdate();
  654. // this.$refs.table.doLayout()
  655. },200)
  656. },
  657. tabsCallback(key) {
  658. this.activeKey = key
  659. // console.log('点击的是', this.activeKey)
  660. if (key == 0) {
  661. var oneData = this.tabsAllData[0]
  662. this.fabData = oneData.syCostAllocationFabricList
  663. this.ingData = oneData.syCostAllocationIngredientList
  664. this.shipData = oneData.syCostAllocationShipdetailList
  665. }
  666. if (key == 1) {
  667. var twoData = this.tabsAllData[1]
  668. this.fabData = twoData.syCostAllocationFabricList
  669. this.ingData = twoData.syCostAllocationIngredientList
  670. this.shipData = twoData.syCostAllocationShipdetailList
  671. }
  672. },
  673. // 面料 -转入数量 弹框
  674. fabQuaCustomCell(record) {
  675. return {
  676. on: {
  677. click: event => {
  678. console.log('面料 - 转入数量')
  679. console.log( this.mList,this.fList)
  680. this.$refs.fabInQuaModal.fabInQuaModVis = true
  681. this.$refs.fabInQuaModal.record = record
  682. record.syTransfers.map(item=>{
  683. if(item.unitCost){
  684. item.unitCost = Number(item.unitCost).toFixed(3)
  685. }
  686. })
  687. this.$refs.fabInQuaModal.data = record.syTransfers
  688. if(this.mList.length!==0){
  689. this.mList.map(item=>{
  690. if(item.goodsName == record.goodsName && item.syTransfers.length!==0){
  691. this.$refs.fabInQuaModal.data = item.syTransfers
  692. }
  693. })
  694. }
  695. }
  696. }
  697. }
  698. },
  699. closeFabInQua(data,record){
  700. var all = 0,
  701. allYu = 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. if(item.remainingQuantitycost&&item.remainingQuantitycost!==''){
  710. allYu+=Number(item.remainingQuantitycost)
  711. }
  712. })
  713. this.$emit('FabInQua',all,allYu)
  714. this.$forceUpdate()
  715. },
  716. closeFabRemQuaModal(data,record){
  717. var all = 0,
  718. allYu = 0
  719. this.fabData.map(item=>{
  720. if(item.goodsName == record.goodsName){
  721. item.remainingQuantitycost = data
  722. }
  723. if(item.transferCost&&item.transferCost!==''){
  724. all+=Number(item.transferCost)
  725. }
  726. if(item.remainingQuantitycost&&item.remainingQuantitycost!==''){
  727. allYu+=Number(item.remainingQuantitycost)
  728. }
  729. })
  730. this.$emit('FabInQua',all,allYu)
  731. this.$forceUpdate()
  732. },
  733. closeIngInQua(data,record){
  734. this.ingData.map(item=>{
  735. if(item.goodsName == record.goodsName){
  736. item.transferCost = data
  737. }
  738. })
  739. },
  740. // 面料 -余下数量 弹框
  741. fabRemQuaCustomCell(record) {
  742. return {
  743. on: {
  744. click: event => {
  745. console.log('面料 - 余下数量')
  746. this.$refs.fabRemQuaModal.fabRemQuaModVis = true
  747. this.$refs.fabRemQuaModal.recordF = record
  748. this.$refs.fabRemQuaModal.data = record.syRemaining
  749. if(this.mList.length!==0){
  750. this.mList.map(item=>{
  751. if(item.goodsName == record.goodsName && item.syRemaining.length!==0){
  752. this.$refs.fabRemQuaModal.data = item.syRemaining
  753. }
  754. })
  755. }
  756. }
  757. }
  758. }
  759. },
  760. //面料-多发少发
  761. pilosityFewerCell(record){
  762. return {
  763. on: {
  764. click: event => {
  765. console.log('面料 - 多发少发')
  766. this.$refs.pilosityFewerListModal.pilosityFewerModVis = true
  767. this.$refs.pilosityFewerListModal.pilosityFewerList = record.pilosityFewerList
  768. }
  769. }
  770. }
  771. },
  772. // 辅料-转入数量 弹框
  773. ingInQuaCustomCell(record) {console.log('辅料 - 转入数量')
  774. return {
  775. on: {
  776. click: event => {
  777. console.log('辅料 - 转入数量')
  778. this.$refs.ingInQuaModal.ingInQuaModVis = true
  779. this.$refs.ingInQuaModal.planNum = this.planNum
  780. this.$refs.ingInQuaModal.record = record
  781. record.syTransfers.map(item=>{
  782. if(item.unitCost){
  783. item.unitCost = (item.unitCost).toFixed(3)
  784. }
  785. })
  786. this.$refs.ingInQuaModal.data = record.syTransfers
  787. if(this.fList.length!==0){
  788. this.fList.map(item=>{
  789. if(item.goodsName == record.goodsName &&item.syTransfers){
  790. this.$refs.ingInQuaModal.data = item.syTransfers
  791. }
  792. })
  793. }
  794. }
  795. }
  796. }
  797. },
  798. // 辅料-余下数量 弹框
  799. ingRemQuaCustomCell(record) {
  800. return {
  801. on: {
  802. click: event => {
  803. console.log('辅料 - 余下数量')
  804. this.$refs.ingRemQuaModal.ingRemQuaModVis = true
  805. this.$refs.ingRemQuaModal.data = record.syRemaining
  806. }
  807. }
  808. }
  809. },
  810. inputRemark(record,data){
  811. this.$refs.submitInformation.remarkModVis = true
  812. this.$refs.submitInformation.value = record.remarks
  813. this.$refs.submitInformation.text = data
  814. this.$refs.submitInformation.father = record
  815. },
  816. closeRemark(value,data,record){
  817. record.remarks=value
  818. }
  819. },
  820. computed: {
  821. // 合计数据
  822. // sumInfoSource() {}
  823. }
  824. }
  825. </script>
  826. <style lang="less" scoped>
  827. @import '~@assets/less/common.less';
  828. @import '~@assets/less/overwriter.less';
  829. /deep/ .ant-table-thead > tr > th {
  830. text-align: center;
  831. // font-weight: 700;
  832. }
  833. /deep/ .ant-table-tbody {
  834. text-align: center;
  835. }
  836. // /deep/ th.replacecolor {
  837. // background-color: #ccc;
  838. // }
  839. //tbas内 小标签
  840. .table-title {
  841. font-weight: 700;
  842. }
  843. .fontColor{
  844. color: red;
  845. }
  846. /deep/ .ant-tabs-nav .ant-tabs-tab-active {
  847. font-size: 18px;
  848. }
  849. /deep/ .ant-tabs-nav .ant-tabs-tab {
  850. font-size: 18px;
  851. }
  852. /deep/ .ant-tabs-nav .ant-tabs-tab {
  853. padding: 0 0 10px 0;
  854. }
  855. /deep/ .fontColor .ant-form-item-label > label{
  856. color: red !important;
  857. }
  858. /deep/.ant-table-fixed{
  859. width:18% !important
  860. }
  861. /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>{
  862. width:29% !important
  863. }
  864. </style>