salesOrderDetailsDrawer.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. <template>
  2. <!-- 销售订单详情 -->
  3. <div id="salesOrderDetailsDrawer">
  4. <a-drawer title="销售订单详情" width="89%" placement="right" :closable="true" :visible="visible" @close="onClose">
  5. <!-- 主表 展示 -->
  6. <a-card :bordered="true">
  7. <div class="table-page-search-wrapper">
  8. <a-form layout="inline">
  9. <a-row :gutter="24">
  10. <a-col :md="6" :sm="8">
  11. <a-form-item label="部门">
  12. {{ salesOrderMain.cdepName }}
  13. </a-form-item>
  14. </a-col>
  15. <a-col :md="6" :sm="8">
  16. <a-form-item label="业务员">
  17. {{ salesOrderMain.cpersonName }}
  18. </a-form-item>
  19. </a-col>
  20. <a-col :md="6" :sm="8">
  21. <a-form-item label="客户">
  22. {{ salesOrderMain.cCusName }}
  23. </a-form-item>
  24. </a-col>
  25. <a-col :md="6" :sm="8">
  26. <a-form-item label="物料编号">
  27. {{ salesOrderMain.todo }}
  28. </a-form-item>
  29. </a-col>
  30. <a-col :md="6" :sm="8">
  31. <a-form-item label="物料名称">
  32. {{ salesOrderMain.CInvName }}
  33. </a-form-item>
  34. </a-col>
  35. <a-col :md="6" :sm="8">
  36. <a-form-item label="款号">
  37. {{ salesOrderMain.itemNumber }}
  38. </a-form-item>
  39. </a-col>
  40. <a-col :md="6" :sm="8">
  41. <a-form-item label="颜色">
  42. {{ salesOrderMain.color }}
  43. </a-form-item>
  44. </a-col>
  45. <a-col :md="6" :sm="8">
  46. <a-form-item label="交期">
  47. {{ salesOrderMain.dpreDateBT }}
  48. </a-form-item>
  49. </a-col>
  50. <a-col :md="6" :sm="8">
  51. <a-form-item label="订单数量">
  52. {{ salesOrderMain.iquantity }}
  53. </a-form-item>
  54. </a-col>
  55. <a-col :md="6" :sm="8">
  56. <a-form-item label="单价(原币)">
  57. {{ salesOrderMain.icostsum }}
  58. </a-form-item>
  59. </a-col>
  60. <a-col :md="6" :sm="8">
  61. <a-form-item label="总额(原币)">
  62. {{ salesOrderMain.totalSum }}
  63. </a-form-item>
  64. </a-col>
  65. <a-col :md="6" :sm="8">
  66. <a-form-item label="单价(本币)">
  67. {{ salesOrderMain.bbPrice }}
  68. </a-form-item>
  69. </a-col>
  70. <a-col :md="6" :sm="8">
  71. <a-form-item label="总额(本币)">
  72. {{ salesOrderMain.iNatSum }}
  73. </a-form-item>
  74. </a-col>
  75. <a-col :md="6" :sm="8">
  76. <a-form-item label="单件成本(本币)">
  77. {{ salesOrderMain.todo2 }}
  78. </a-form-item>
  79. </a-col>
  80. <a-col :md="6" :sm="8">
  81. <a-form-item label="已出库数量">
  82. {{ salesOrderMain.foutquantity }}
  83. </a-form-item>
  84. </a-col>
  85. <a-col :md="6" :sm="8">
  86. <a-form-item label="累计开票数量">
  87. {{ salesOrderMain.iKPQuantity }}
  88. </a-form-item>
  89. </a-col>
  90. <a-col :md="6" :sm="8">
  91. <a-form-item label="计划单号">
  92. {{ salesOrderMain.planCode }}
  93. </a-form-item>
  94. </a-col>
  95. <a-col :md="6" :sm="8">
  96. <a-form-item label="业务填写">
  97. {{ salesOrderMain.todo3 }}
  98. </a-form-item>
  99. </a-col>
  100. </a-row>
  101. </a-form>
  102. </div>
  103. </a-card>
  104. <!-- 展示 子表 采购 -->
  105. <a-card :bordered="true" style="margin:10px 0;">
  106. <div style="marginTop:30px;">
  107. <h6 class="table-title">采购</h6>
  108. <a-table
  109. bordered
  110. rowKey="id"
  111. :loading="loading"
  112. :columns="purchaseColumns"
  113. :data-source="purchaseData"
  114. :pagination="false"
  115. :scroll="{ x: 1500 }"
  116. >
  117. <!-- 物料编号 -->
  118. <span slot="materialNum" slot-scope="text">
  119. <a>{{ text }}</a>
  120. </span>
  121. </a-table>
  122. </div>
  123. <!-- 委外 -->
  124. <div style="margin:60px 0;">
  125. <h6 class="table-title">委外</h6>
  126. <a-table
  127. bordered
  128. rowKey="id"
  129. :loading="loading"
  130. :columns="outsourceColumns"
  131. :data-source="outsourceData"
  132. :pagination="false"
  133. :scroll="{ x: 1500 }"
  134. >
  135. <!-- 物料编号 弹框-->
  136. <span slot="materialNum" slot-scope="text">
  137. <a>{{ text }}</a>
  138. </span>
  139. </a-table>
  140. </div>
  141. <!-- 物料卡开始 -->
  142. <div>
  143. <h6 class="table-title">物料卡</h6>
  144. <!-- 查询区域 -->
  145. <div class="table-page-search-wrapper" style="background:#f2f2f2;padding:30px 10px 0 10px;">
  146. <a-form layout="inline" @keyup.enter.native="searchQuery">
  147. <a-row :gutter="24">
  148. <a-col :md="6" :sm="8">
  149. <a-form-item label="日期">
  150. <a-date-picker
  151. style="width: 100%"
  152. placeholder="请选择日期"
  153. v-model="queryParam.data"
  154. ></a-date-picker>
  155. </a-form-item>
  156. </a-col>
  157. <a-col :md="6" :sm="8">
  158. <a-form-item label="物料" has-feedback>
  159. <a-input placeholder="请输入物料" v-model="queryParam.material"></a-input>
  160. </a-form-item>
  161. </a-col>
  162. <a-col :md="6" :sm="8">
  163. <a-form-item label="计划单号">
  164. <a-input placeholder="请输入计划单号" v-model="queryParam.planOrderNo"></a-input>
  165. </a-form-item>
  166. </a-col>
  167. <a-col :md="6" :sm="8">
  168. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  169. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  170. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  171. <a @click="handleToggleSearch" style="margin-left: 8px">
  172. {{ toggleSearchStatus ? '收起' : '展开' }}
  173. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  174. </a>
  175. </span>
  176. </a-col>
  177. </a-row>
  178. </a-form>
  179. </div>
  180. <a-table
  181. bordered
  182. rowKey="id"
  183. :loading="loading"
  184. :columns="materialCardColumns"
  185. :data-source="materialCardData"
  186. :pagination="false"
  187. :scroll="{ x: 1500 }"
  188. >
  189. <!-- ???? 弹框-->
  190. <span slot="???" slot-scope="text">
  191. <a>{{ text }}</a>
  192. </span>
  193. </a-table>
  194. </div>
  195. </a-card>
  196. <!-- 物料卡结束 -->
  197. </a-drawer>
  198. <!-- 点击【物料编号】----出入库详细数据 抽屉 -->
  199. <outInDetailData-drawer ref="outInDetailDataDrawer" @ok="modalFormOk"></outInDetailData-drawer>
  200. </div>
  201. </template>
  202. <script>
  203. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  204. import JEllipsis from '@/components/jeecg/JEllipsis'
  205. import moment from 'moment'
  206. // import { salesOrderAll } from '@api/reportForms/pro-progress-report.js'
  207. import outInDetailDataDrawer from '@views/reportForms/pro-progress-report/outInDetailDataDrawer.vue'
  208. export default {
  209. name: 'salesOrderDetailsDrawer', // 销售订单详情
  210. mixins: [JeecgListMixin],
  211. components: { JEllipsis, moment, outInDetailDataDrawer },
  212. data() {
  213. return {
  214. loading: false, // 表格加载
  215. visible: false, // 单个订单报表 抽屉
  216. salesOrderMain: [], // 主表信息
  217. record: {}, //点击的销售订单对象(参数)
  218. // 物料卡 查询条件
  219. queryParam: {
  220. pageNo: '', // 初始页
  221. data: '', // 日期
  222. material: '', // 物料
  223. planOrderNo: '' // 计划单号
  224. },
  225. // 采购 表头
  226. purchaseColumns: [
  227. { title: '账套信息', width: 120, dataIndex: 'accountSetInfo', fixed: 'left', className: 'replacecolor' },
  228. {
  229. title: '采购订单号',
  230. width: 160,
  231. dataIndex: 'purchaseOrderNum',
  232. fixed: 'left',
  233. className: 'replacecolor'
  234. },
  235. { title: '供应商', width: 120, dataIndex: 'supplier', className: 'replacecolor' },
  236. {
  237. title: '物料编号',
  238. width: 120,
  239. dataIndex: 'materialNum',
  240. className: 'replacecolor',
  241. fixed: 'left',
  242. customCell: this.materialNumCustomCell,
  243. scopedSlots: { customRender: 'materialNum' }
  244. },
  245. { title: '单价(本币)', width: 100, dataIndex: 'priceLocal', className: 'replacecolor' },
  246. { title: '物料名称', width: 210, dataIndex: 'materialName', className: 'replacecolor' },
  247. { title: '计划数量(LRP)', width: 160, dataIndex: 'planQuantity', className: 'replacecolor' },
  248. { title: '订单数量', width: 120, dataIndex: 'orderQuantity', className: 'replacecolor' },
  249. { title: '累计入库数量', width: 140, dataIndex: 'accumulativeInQuantity', className: 'replacecolor' },
  250. { title: '累计开票数量', width: 140, dataIndex: 'invoicesCumulativeNum', className: 'replacecolor' },
  251. { title: '累计开票金额', width: 140, dataIndex: 'cumulativeInvoiceAmount', className: 'replacecolor' },
  252. { title: '下游订单', width: 160, dataIndex: 'downstreamOrder', className: 'replacecolor' },
  253. { title: '使用数量', width: 140, dataIndex: 'usageQuantity', className: 'replacecolor' },
  254. { title: '余料', width: 100, dataIndex: 'oddments', fixed: 'right', className: 'replacecolor' }
  255. ],
  256. purchaseData: [
  257. {
  258. accountSetInfo: '宁波森语',
  259. purchaseOrderNum: 'SYA525-林辉',
  260. supplier: '林辉',
  261. materialNum: '0501000315',
  262. priceLocal: '0.353',
  263. materialName: '4.5CM黑色橡胶丝进口橡筋',
  264. planQuantity: '21879.84',
  265. orderQuantity: '21879.84',
  266. accumulativeInQuantity: '21879'
  267. },
  268. {},
  269. {}
  270. ],
  271. // 委外 表头
  272. outsourceColumns: [
  273. {
  274. title: '委外订单号',
  275. width: 120,
  276. dataIndex: 'purchaseAboardOrderNum',
  277. fixed: 'left',
  278. className: 'replacecolor'
  279. },
  280. { title: '供应商', width: 120, dataIndex: 'supplier', fixed: 'left', className: 'replacecolor' },
  281. {
  282. title: '物料编号',
  283. width: 120,
  284. dataIndex: 'materialNum',
  285. fixed: 'left',
  286. className: 'replacecolor',
  287. customCell: this.materialNumCustomCell,
  288. scopedSlots: { customRender: 'materialNum' }
  289. },
  290. { title: '物料名称', width: 210, dataIndex: 'materialName', className: 'replacecolor' },
  291. { title: '颜色', width: 120, dataIndex: 'color', className: 'replacecolor' },
  292. { title: '门幅', width: 120, dataIndex: 'larghezza', className: 'replacecolor' },
  293. { title: '单价(本币/原币)', width: 140, dataIndex: 'price', className: 'replacecolor' },
  294. { title: '计划数量(LRP)', width: 160, dataIndex: 'planQuantity', className: 'replacecolor' },
  295. { title: '订单数量', width: 120, dataIndex: 'orderQuantity', className: 'replacecolor' },
  296. { title: '累计入库数量', width: 140, dataIndex: 'accumulativeInQuantity', className: 'replacecolor' },
  297. { title: '累计开票数量', width: 140, dataIndex: 'invoicesCumulativeNum', className: 'replacecolor' },
  298. { title: '累计开票金额', width: 140, dataIndex: 'cumulativeInvoiceAmount', className: 'replacecolor' },
  299. { title: '下游订单', width: 160, dataIndex: 'downstreamOrder', className: 'replacecolor' },
  300. { title: '使用数量', width: 140, dataIndex: 'usageQuantity', className: 'replacecolor' },
  301. { title: '余下库存', width: 100, dataIndex: 'remainingInventory', className: 'replacecolor' },
  302. { title: '子件编号', width: 100, dataIndex: 'childNum', className: 'replacecolor' },
  303. { title: '子件名称', width: 100, dataIndex: 'childName', className: 'replacecolor' },
  304. { title: '子件应领数量', width: 140, dataIndex: 'receivedcdQuantity', className: 'replacecolor' },
  305. { title: '子件已领数量', width: 140, dataIndex: 'cdHadQuantity', className: 'replacecolor' },
  306. { title: '子件总成本', width: 140, dataIndex: 'cdTotalCost', className: 'replacecolor' },
  307. { title: '采购订单号', width: 160, dataIndex: 'purchaseOrderNum', fixed: 'right', className: 'replacecolor' }
  308. ],
  309. outsourceData: [{ materialNum: 'N0201000666' }, {}],
  310. // 物料卡 表头
  311. materialCardColumns: [
  312. {
  313. title: '计划单号',
  314. width: 140,
  315. dataIndex: 'planOrderNo',
  316. fixed: 'left',
  317. className: 'replacecolor'
  318. },
  319. { title: '颜色', width: 120, dataIndex: 'color', className: 'replacecolor' },
  320. {
  321. title: '供应商',
  322. width: 120,
  323. dataIndex: 'supplier',
  324. className: 'replacecolor'
  325. },
  326. { title: '物料', width: 120, dataIndex: 'material', className: 'replacecolor' },
  327. { title: '订单数', width: 120, dataIndex: 'orderQuantity', className: 'replacecolor' },
  328. { title: '用量', width: 120, dataIndex: 'dosage', className: 'replacecolor' },
  329. { title: '总数量', width: 140, dataIndex: 'totalQuantity', className: 'replacecolor' },
  330. { title: '合计', width: 160, dataIndex: 'total', className: 'replacecolor' },
  331. { title: '差异', width: 120, dataIndex: 'diff', className: 'replacecolor' },
  332. { title: 'what', width: 140, dataIndex: 'what', className: 'replacecolor' },
  333. { title: 'what1', width: 140, dataIndex: 'what1', className: 'replacecolor' },
  334. { title: 'what2', width: 140, dataIndex: 'what2', className: 'replacecolor' },
  335. { title: 'what3', width: 140, dataIndex: 'what3', className: 'replacecolor' },
  336. { title: 'what4', width: 140, dataIndex: 'what4', className: 'replacecolor' },
  337. { title: 'what5', width: 140, dataIndex: 'what5', className: 'replacecolor' },
  338. { title: '备注', width: 210, dataIndex: 'note', fixed: 'right', className: 'replacecolor' }
  339. ],
  340. materialCardData: [{}, {}]
  341. }
  342. },
  343. created() {
  344. this.getDetails()
  345. },
  346. methods: {
  347. // 销售订单所有详情
  348. getDetails() {
  349. this.$nextTick(() => {
  350. console.log('销售订单号', this.record.csocode)
  351. console.log('计划单号', this.record.planCode)
  352. console.log('款号', this.record.itemNumber)
  353. // console.log('物料编码', this.record.csocode)
  354. // salesOrderAll({
  355. // csocode: this.record.csocode,
  356. // planCode: this.record.planCode,
  357. // itemNumber: this.record.itemNumber,
  358. // todo: this.record.todo
  359. // }).then(res => {
  360. // if (res.success) {
  361. // console.log('销售订单详情返回所有数据', res.result)
  362. // this.salesOrderMain = res.result.record //主表信息
  363. // // 采购 委外 物料卡 信息在 res 什么地方???
  364. // }
  365. // })
  366. })
  367. },
  368. // 采购、委外 【物料编号】 抽屉--打开【出入库详细数据】
  369. materialNumCustomCell(record) {
  370. return {
  371. on: {
  372. click: event => {
  373. console.log('传给出入库的对象', record)
  374. this.$refs.outInDetailDataDrawer.visible = true
  375. this.$refs.outInDetailDataDrawer.record = record
  376. this.$refs.outInDetailDataDrawer.getoutInDetailData()
  377. }
  378. }
  379. }
  380. },
  381. // 物料卡----查询按钮
  382. searchQuery() {
  383. // 物料卡信息
  384. },
  385. searchReset() {
  386. this.queryParam = {}
  387. },
  388. // 关闭抽屉
  389. onClose() {
  390. this.visible = false
  391. }
  392. }
  393. }
  394. </script>
  395. <style lang="less" scoped>
  396. @import '~@assets/less/common.less';
  397. @import '~@assets/less/overwriter.less';
  398. /deep/ .ant-table-thead > tr > th {
  399. text-align: center;
  400. // font-weight: 700;
  401. }
  402. /deep/ .ant-table-tbody {
  403. text-align: center;
  404. }
  405. // /deep/ th.replacecolor {
  406. // background-color: #ccc;
  407. // }
  408. // 抽屉里的card样式
  409. /deep/ .ant-drawer-content {
  410. background-color: #f0f2f5;
  411. }
  412. /deep/ .ant-drawer-body {
  413. padding: 10px;
  414. }
  415. </style>