singleOrderReportDrawer.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. <template>
  2. <!-- 单个订单报表 -->
  3. <a-card :bordered="false">
  4. <a-drawer
  5. title="单个订单报表"
  6. width="89%"
  7. placement="right"
  8. :closable="true"
  9. :visible="visible"
  10. @close="onClose">
  11. <!--主表信息 -->
  12. <div class="table-page-search-wrapper">
  13. <a-form layout="inline">
  14. <a-row :gutter="24">
  15. <a-col :md="6" :sm="8">
  16. <a-form-item label="部门">
  17. <a-input v-model="singleOrder.department"></a-input>
  18. </a-form-item>
  19. </a-col>
  20. <a-col :md="6" :sm="8">
  21. <a-form-item label="业务员">
  22. <a-input v-model="singleOrder.salesman"></a-input>
  23. </a-form-item>
  24. </a-col>
  25. <a-col :md="6" :sm="8">
  26. <a-form-item label="客户">
  27. <a-input v-model="singleOrder.customer"></a-input>
  28. </a-form-item>
  29. </a-col>
  30. <a-col :md="6" :sm="8">
  31. <a-form-item label="物料编号">
  32. <a-input v-model="singleOrder.materialNum"></a-input>
  33. </a-form-item>
  34. </a-col>
  35. <a-col :md="6" :sm="8">
  36. <a-form-item label="物料名称">
  37. <a-input v-model="singleOrder.materialName"></a-input>
  38. </a-form-item>
  39. </a-col>
  40. <a-col :md="6" :sm="8">
  41. <a-form-item label="款号">
  42. <a-input v-model="singleOrder.styleNum"></a-input>
  43. </a-form-item>
  44. </a-col>
  45. <a-col :md="6" :sm="8">
  46. <a-form-item label="颜色">
  47. <a-input v-model="singleOrder.color"></a-input>
  48. </a-form-item>
  49. </a-col>
  50. <a-col :md="6" :sm="8">
  51. <a-form-item label="交期">
  52. <!-- <a-date-picker style="width: 100%" v-model="queryParam.deliveryDate"></a-date-picker> -->
  53. <a-input v-model="singleOrder.deliveryDate"></a-input>
  54. </a-form-item>
  55. </a-col>
  56. <a-col :md="6" :sm="8">
  57. <a-form-item label="订单数量">
  58. <a-input v-model="singleOrder.orderQuantity"></a-input>
  59. </a-form-item>
  60. </a-col>
  61. <a-col :md="6" :sm="8">
  62. <a-form-item label="单价(原币)">
  63. <a-input v-model="singleOrder.priceOriginal"></a-input>
  64. </a-form-item>
  65. </a-col>
  66. <a-col :md="6" :sm="8">
  67. <a-form-item label="总额(原币)">
  68. <a-input v-model="singleOrder.totalAmountOriginal"></a-input>
  69. </a-form-item>
  70. </a-col>
  71. <a-col :md="6" :sm="8">
  72. <a-form-item label="单价(本币)">
  73. <a-input v-model="singleOrder.priceLocal"></a-input>
  74. </a-form-item>
  75. </a-col>
  76. <a-col :md="6" :sm="8">
  77. <a-form-item label="总额(本币)">
  78. <a-input v-model="singleOrder.totalAmountLocal"></a-input>
  79. </a-form-item>
  80. </a-col>
  81. <a-col :md="6" :sm="8">
  82. <a-form-item label="单件成本(本币)">
  83. <a-input v-model="singleOrder.UnitCostLocal"></a-input>
  84. </a-form-item>
  85. </a-col>
  86. <a-col :md="6" :sm="8">
  87. <a-form-item label="已出库数量">
  88. <a-input v-model="singleOrder.quantityDelivered"></a-input>
  89. </a-form-item>
  90. </a-col>
  91. <a-col :md="6" :sm="8">
  92. <a-form-item label="累计开票数量">
  93. <a-input v-model="singleOrder.invoicesCumulativeNum"></a-input>
  94. </a-form-item>
  95. </a-col>
  96. <a-col :md="6" :sm="8">
  97. <a-form-item label="计划单号">
  98. <a-input v-model="singleOrder.planOrderNo"></a-input>
  99. </a-form-item>
  100. </a-col>
  101. <a-col :md="6" :sm="8">
  102. <a-form-item label="业务填写">
  103. <a-input v-model="singleOrder.businessFill"></a-input>
  104. </a-form-item>
  105. </a-col>
  106. </a-row>
  107. </a-form>
  108. </div>
  109. <!-- 子表 采购 -->
  110. <div style="marginTop:30px;">
  111. <h6 class="table-title">采购</h6>
  112. <a-table
  113. bordered
  114. rowKey="id"
  115. :loading="loading"
  116. :columns="purchaseColumns"
  117. :data-source="purchaseData"
  118. :pagination="false"
  119. :scroll="{ x: 1500 }"
  120. >
  121. <!-- 物料编号 -->
  122. <span slot="materialNum" slot-scope="text">
  123. <a>{{ text }}</a>
  124. </span>
  125. </a-table>
  126. </div>
  127. <!-- 子表 委外 -->
  128. <div style="margin:60px 0;">
  129. <h6 class="table-title">委外</h6>
  130. <a-table
  131. bordered
  132. rowKey="id"
  133. :loading="loading"
  134. :columns="outsourceColumns"
  135. :data-source="outsourceData"
  136. :pagination="false"
  137. :scroll="{ x: 1500 }"
  138. >
  139. <!-- 物料编号 弹框-->
  140. <span slot="materialNum" slot-scope="text">
  141. <a>{{ text }}</a>
  142. </span>
  143. </a-table>
  144. </div>
  145. <!-- 子表 物料卡开始 -->
  146. <div>
  147. <h6 class="table-title">物料卡</h6>
  148. <!-- 查询区域 -->
  149. <div class="table-page-search-wrapper" style="background:#f2f2f2;padding:30px 10px 0 10px;">
  150. <a-form layout="inline" @keyup.enter.native="searchQuery">
  151. <a-row :gutter="24">
  152. <a-col :md="6" :sm="8">
  153. <a-form-item label="日期">
  154. <a-date-picker style="width: 100%" placeholder="请选择日期" v-model="queryParam.data"></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. <!-- 物料卡结束 -->
  196. </a-drawer>
  197. <!-- 出入库详细数据 抽屉 -->
  198. <outInDetailData-drawer ref="outInDetailDataDrawer" :father="aa" @ok="modalFormOk"></outInDetailData-drawer>
  199. </a-card>
  200. </template>
  201. <script>
  202. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  203. import JEllipsis from '@/components/jeecg/JEllipsis'
  204. import moment from 'moment'
  205. import outInDetailDataDrawer from '@views/reportForms/pro-progress-report/outInDetailDataDrawer.vue'
  206. export default {
  207. name: 'SingleOrderReportDrawer',
  208. mixins: [JeecgListMixin],
  209. components: { JEllipsis, moment, outInDetailDataDrawer },
  210. data() {
  211. return {
  212. description: '单个订单报表抽屉 页面',
  213. loading: false, // 表格加载
  214. visible: false, // 单个订单报表 抽屉
  215. singleOrder: [], // 主表信息
  216. // 物料卡 查询条件
  217. queryParam: {
  218. data: '', // 日期
  219. material: '', // 物料
  220. planOrderNo: '' // 计划单号
  221. },
  222. // 采购 表头
  223. purchaseColumns: [
  224. { title: '账套信息', width: 120, dataIndex: 'accountSetInfo', fixed: 'left', className: 'replacecolor' },
  225. {
  226. title: '采购订单号',
  227. width: 160,
  228. dataIndex: 'purchaseOrderNum',
  229. fixed: 'left',
  230. className: 'replacecolor'
  231. },
  232. { title: '供应商', width: 120, dataIndex: 'supplier', className: 'replacecolor' },
  233. {
  234. title: '物料编号',
  235. width: 120,
  236. dataIndex: 'materialNum',
  237. className: 'replacecolor',
  238. fixed: 'left',
  239. customCell: this.materialNumCustomCell,
  240. scopedSlots: { customRender: 'materialNum' }
  241. },
  242. { title: '单价(本币)', width: 100, dataIndex: 'priceLocal', className: 'replacecolor' },
  243. { title: '物料名称', width: 210, dataIndex: 'materialName', className: 'replacecolor' },
  244. { title: '计划数量(LRP)', width: 160, dataIndex: 'planQuantity', className: 'replacecolor' },
  245. { title: '订单数量', width: 120, dataIndex: 'orderQuantity', className: 'replacecolor' },
  246. { title: '累计入库数量', width: 140, dataIndex: 'accumulativeInQuantity', className: 'replacecolor' },
  247. { title: '累计开票数量', width: 140, dataIndex: 'invoicesCumulativeNum', className: 'replacecolor' },
  248. { title: '累计开票金额', width: 140, dataIndex: 'cumulativeInvoiceAmount', className: 'replacecolor' },
  249. { title: '下游订单', width: 160, dataIndex: 'downstreamOrder', className: 'replacecolor' },
  250. { title: '使用数量', width: 140, dataIndex: 'usageQuantity', className: 'replacecolor' },
  251. { title: '余料', width: 100, dataIndex: 'oddments', fixed: 'right', className: 'replacecolor' }
  252. ],
  253. purchaseData: [
  254. {
  255. accountSetInfo: '宁波森语',
  256. purchaseOrderNum: 'SYA525-林辉',
  257. supplier: '林辉',
  258. materialNum: '0501000315',
  259. priceLocal: '0.353',
  260. materialName: '4.5CM黑色橡胶丝进口橡筋',
  261. planQuantity: '21879.84',
  262. orderQuantity: '21879.84',
  263. accumulativeInQuantity: '21879'
  264. },
  265. {},
  266. {}
  267. ],
  268. // 委外 表头
  269. outsourceColumns: [
  270. {
  271. title: '委外订单号',
  272. width: 120,
  273. dataIndex: 'purchaseAboardOrderNum',
  274. fixed: 'left',
  275. className: 'replacecolor'
  276. },
  277. { title: '供应商', width: 120, dataIndex: 'supplier', fixed: 'left', className: 'replacecolor' },
  278. {
  279. title: '物料编号',
  280. width: 120,
  281. dataIndex: 'materialNum',
  282. fixed: 'left',
  283. className: 'replacecolor',
  284. customCell: this.materialNumCustomCell,
  285. scopedSlots: { customRender: 'materialNum' }
  286. },
  287. { title: '物料名称', width: 210, dataIndex: 'materialName', className: 'replacecolor' },
  288. { title: '颜色', width: 120, dataIndex: 'color', className: 'replacecolor' },
  289. { title: '门幅', width: 120, dataIndex: 'larghezza', className: 'replacecolor' },
  290. { title: '单价(本币/原币)', width: 140, dataIndex: 'price', className: 'replacecolor' },
  291. { title: '计划数量(LRP)', width: 160, dataIndex: 'planQuantity', className: 'replacecolor' },
  292. { title: '订单数量', width: 120, dataIndex: 'orderQuantity', className: 'replacecolor' },
  293. { title: '累计入库数量', width: 140, dataIndex: 'accumulativeInQuantity', className: 'replacecolor' },
  294. { title: '累计开票数量', width: 140, dataIndex: 'invoicesCumulativeNum', className: 'replacecolor' },
  295. { title: '累计开票金额', width: 140, dataIndex: 'cumulativeInvoiceAmount', className: 'replacecolor' },
  296. { title: '下游订单', width: 160, dataIndex: 'downstreamOrder', className: 'replacecolor' },
  297. { title: '使用数量', width: 140, dataIndex: 'usageQuantity', className: 'replacecolor' },
  298. { title: '余下库存', width: 100, dataIndex: 'remainingInventory', className: 'replacecolor' },
  299. { title: '子件编号', width: 100, dataIndex: 'childNum', className: 'replacecolor' },
  300. { title: '子件名称', width: 100, dataIndex: 'childName', className: 'replacecolor' },
  301. { title: '子件应领数量', width: 140, dataIndex: 'receivedcdQuantity', className: 'replacecolor' },
  302. { title: '子件已领数量', width: 140, dataIndex: 'cdHadQuantity', className: 'replacecolor' },
  303. { title: '子件总成本', width: 140, dataIndex: 'cdTotalCost', className: 'replacecolor' },
  304. { title: '采购订单号', width: 160, dataIndex: 'purchaseOrderNum', fixed: 'right', className: 'replacecolor' }
  305. ],
  306. outsourceData: [{ materialNum: 'N0201000666' }, {}],
  307. // 物料卡 表头
  308. materialCardColumns: [
  309. {
  310. title: '计划单号',
  311. width: 140,
  312. dataIndex: 'planOrderNo',
  313. fixed: 'left',
  314. className: 'replacecolor'
  315. },
  316. { title: '颜色', width: 120, dataIndex: 'color', className: 'replacecolor' },
  317. {
  318. title: '供应商',
  319. width: 120,
  320. dataIndex: 'supplier',
  321. className: 'replacecolor'
  322. },
  323. { title: '物料', width: 120, dataIndex: 'material', className: 'replacecolor' },
  324. { title: '订单数', width: 120, dataIndex: 'orderQuantity', className: 'replacecolor' },
  325. { title: '用量', width: 120, dataIndex: 'dosage', className: 'replacecolor' },
  326. { title: '总数量', width: 140, dataIndex: 'totalQuantity', className: 'replacecolor' },
  327. { title: '合计', width: 160, dataIndex: 'total', className: 'replacecolor' },
  328. { title: '差异', width: 120, dataIndex: 'diff', className: 'replacecolor' },
  329. { title: 'what', width: 140, dataIndex: 'what', className: 'replacecolor' },
  330. { title: 'what1', width: 140, dataIndex: 'what1', className: 'replacecolor' },
  331. { title: 'what2', width: 140, dataIndex: 'what2', className: 'replacecolor' },
  332. { title: 'what3', width: 140, dataIndex: 'what3', className: 'replacecolor' },
  333. { title: 'what4', width: 140, dataIndex: 'what4', className: 'replacecolor' },
  334. { title: 'what5', width: 140, dataIndex: 'what5', className: 'replacecolor' },
  335. { title: '备注', width: 210, dataIndex: 'note', fixed: 'right', className: 'replacecolor' }
  336. ],
  337. materialCardData: [{}, {}]
  338. }
  339. },
  340. created() {},
  341. methods: {
  342. // 采购、委外 【物料编号】 抽屉--打开【出入库详细数据】
  343. materialNumCustomCell(record) {
  344. return {
  345. on: {
  346. click: event => {
  347. // console.log('this:', this)
  348. // console.log('event:', event)
  349. console.log('点击了【物料编号】--【出入库详细数据】')
  350. this.$refs.outInDetailDataDrawer.visible = true
  351. }
  352. }
  353. }
  354. },
  355. // 查询按钮
  356. searchQuery() {
  357. // 渲染订单销售列表
  358. },
  359. searchReset() {
  360. // console.log('>>>>重置')
  361. this.queryParam = {}
  362. },
  363. // 关闭抽屉
  364. onClose() {
  365. this.visible = false
  366. },
  367. // 出入库详细数据 抽屉father
  368. aa() {}
  369. },
  370. computed: {},
  371. mounted() {}
  372. }
  373. </script>
  374. <style lang="less" scoped>
  375. @import '~@assets/less/common.less';
  376. @import '~@assets/less/overwriter.less';
  377. /deep/ .ant-table-thead > tr > th {
  378. text-align: center;
  379. // font-weight: 700;
  380. }
  381. /deep/ .ant-table-tbody {
  382. text-align: center;
  383. }
  384. // /deep/ th.replacecolor {
  385. // background-color: #ccc;
  386. // }
  387. </style>