singleOrderReportDrawer.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  1. <template>
  2. <!-- 单个订单报表 -->
  3. <a-drawer
  4. title="单个订单报表"
  5. width="100%"
  6. placement="right"
  7. :closable="true"
  8. :visible="visible"
  9. @close="onClose">
  10. <!--主表信息 -->
  11. <div class="table-page-search-wrapper">
  12. <a-form layout="inline">
  13. <a-row :gutter="24">
  14. <a-col :md="6" :sm="8">
  15. <a-form-item label="部门">
  16. <a-input v-model="singleOrder.department"></a-input>
  17. </a-form-item>
  18. </a-col>
  19. <a-col :md="6" :sm="8">
  20. <a-form-item label="业务员">
  21. <a-input v-model="singleOrder.salesman"></a-input>
  22. </a-form-item>
  23. </a-col>
  24. <a-col :md="6" :sm="8">
  25. <a-form-item label="客户">
  26. <a-input v-model="singleOrder.customer"></a-input>
  27. </a-form-item>
  28. </a-col>
  29. <a-col :md="6" :sm="8">
  30. <a-form-item label="物料编号">
  31. <a-input v-model="singleOrder.materialNum"></a-input>
  32. </a-form-item>
  33. </a-col>
  34. <a-col :md="6" :sm="8">
  35. <a-form-item label="物料名称">
  36. <a-input v-model="singleOrder.materialName"></a-input>
  37. </a-form-item>
  38. </a-col>
  39. <a-col :md="6" :sm="8">
  40. <a-form-item label="款号">
  41. <a-input v-model="singleOrder.styleNum"></a-input>
  42. </a-form-item>
  43. </a-col>
  44. <a-col :md="6" :sm="8">
  45. <a-form-item label="颜色">
  46. <a-input v-model="singleOrder.color"></a-input>
  47. </a-form-item>
  48. </a-col>
  49. <a-col :md="6" :sm="8">
  50. <a-form-item label="交期">
  51. <!-- <a-date-picker style="width: 100%" v-model="queryParam.deliveryDate"></a-date-picker> -->
  52. <a-input v-model="singleOrder.deliveryDate"></a-input>
  53. </a-form-item>
  54. </a-col>
  55. <a-col :md="6" :sm="8">
  56. <a-form-item label="订单数量">
  57. <a-input v-model="singleOrder.orderQuantity"></a-input>
  58. </a-form-item>
  59. </a-col>
  60. <a-col :md="6" :sm="8">
  61. <a-form-item label="单价(原币)">
  62. <a-input v-model="singleOrder.priceOriginal"></a-input>
  63. </a-form-item>
  64. </a-col>
  65. <a-col :md="6" :sm="8">
  66. <a-form-item label="总额(原币)">
  67. <a-input v-model="singleOrder.totalAmountOriginal"></a-input>
  68. </a-form-item>
  69. </a-col>
  70. <a-col :md="6" :sm="8">
  71. <a-form-item label="单价(本币)">
  72. <a-input v-model="singleOrder.priceLocal"></a-input>
  73. </a-form-item>
  74. </a-col>
  75. <a-col :md="6" :sm="8">
  76. <a-form-item label="总额(本币)">
  77. <a-input v-model="singleOrder.totalAmountLocal"></a-input>
  78. </a-form-item>
  79. </a-col>
  80. <a-col :md="6" :sm="8">
  81. <a-form-item label="单件成本(本币)">
  82. <a-input v-model="singleOrder.UnitCostLocal"></a-input>
  83. </a-form-item>
  84. </a-col>
  85. <a-col :md="6" :sm="8">
  86. <a-form-item label="已出库数量">
  87. <a-input v-model="singleOrder.quantityDelivered"></a-input>
  88. </a-form-item>
  89. </a-col>
  90. <a-col :md="6" :sm="8">
  91. <a-form-item label="累计开票数量">
  92. <a-input v-model="singleOrder.invoicesCumulativeNum"></a-input>
  93. </a-form-item>
  94. </a-col>
  95. <a-col :md="6" :sm="8">
  96. <a-form-item label="计划单号">
  97. <a-input v-model="singleOrder.planOrderNo"></a-input>
  98. </a-form-item>
  99. </a-col>
  100. <a-col :md="6" :sm="8">
  101. <a-form-item label="业务填写">
  102. <a-input v-model="singleOrder.businessFill"></a-input>
  103. </a-form-item>
  104. </a-col>
  105. </a-row>
  106. </a-form>
  107. </div>
  108. <!-- table区域 -->
  109. <!-- <a-card style="margin:10px 0;"> -->
  110. <!-- 采购 -->
  111. <div>
  112. <h6 class="table-title">采购</h6>
  113. <a-table
  114. bordered
  115. rowKey="id"
  116. :loading="loading"
  117. :columns="purchaseColumns"
  118. :data-source="purchaseData"
  119. :pagination="false"
  120. :scroll="{ x: 1500 }"
  121. >
  122. <!--字符串超长截取省略号显示 备注 -->
  123. <!-- <span slot="note" slot-scope="text">
  124. <j-ellipsis :value="text" :length="25" />
  125. </span> -->
  126. <!-- 物料编号 -->
  127. <span slot="materialNum" slot-scope="text">
  128. <a>{{ text }}</a>
  129. </span>
  130. </a-table>
  131. </div>
  132. <!-- 委外 -->
  133. <div style="margin:60px 0;">
  134. <h6 class="table-title">委外</h6>
  135. <a-table
  136. bordered
  137. rowKey="id"
  138. :loading="loading"
  139. :columns="outsourceColumns"
  140. :data-source="outsourceData"
  141. :pagination="false"
  142. :scroll="{ x: 1500 }"
  143. >
  144. <!-- 物料编号 弹框-->
  145. <span slot="materialNum" slot-scope="text">
  146. <a>{{ text }}</a>
  147. </span>
  148. </a-table>
  149. </div>
  150. <!-- 物料卡 -->
  151. <div>
  152. <h6 class="table-title" style="marginBottom:10px;">物料卡</h6>
  153. <!-- 查询区域 -->
  154. <div class="table-page-search-wrapper">
  155. <a-form layout="inline" @keyup.enter.native="searchQuery">
  156. <a-row :gutter="24">
  157. <a-col :md="6" :sm="8">
  158. <a-form-item label="日期">
  159. <a-date-picker style="width: 100%" placeholder="请选择日期" v-model="queryParam.data"></a-date-picker>
  160. </a-form-item>
  161. </a-col>
  162. <a-col :md="6" :sm="8">
  163. <a-form-item label="物料" has-feedback>
  164. <a-input placeholder="请输入物料" v-model="queryParam.material"></a-input>
  165. </a-form-item>
  166. </a-col>
  167. <a-col :md="6" :sm="8">
  168. <a-form-item label="计划单号">
  169. <a-input placeholder="请输入计划单号" v-model="queryParam.planOrderNo"></a-input>
  170. </a-form-item>
  171. </a-col>
  172. <a-col :md="6" :sm="8">
  173. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  174. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  175. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  176. <a @click="handleToggleSearch" style="margin-left: 8px">
  177. {{ toggleSearchStatus ? '收起' : '展开' }}
  178. <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
  179. </a>
  180. </span>
  181. </a-col>
  182. </a-row>
  183. </a-form>
  184. </div>
  185. <a-table
  186. bordered
  187. rowKey="id"
  188. :loading="loading"
  189. :columns="materialCardColumns"
  190. :data-source="materialCardData"
  191. :pagination="false"
  192. :scroll="{ x: 1500 }"
  193. >
  194. <!-- ???? 弹框-->
  195. <span slot="???" slot-scope="text">
  196. <a>{{ text }}</a>
  197. </span>
  198. </a-table>
  199. </div>
  200. </a-drawer>
  201. </template>
  202. <script>
  203. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  204. import JEllipsis from '@/components/jeecg/JEllipsis'
  205. import moment from 'moment'
  206. export default {
  207. name: 'SingleOrderReportDrawer',
  208. mixins: [JeecgListMixin],
  209. components: { JEllipsis, moment },
  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', 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('点击了单元格')
  348. // console.log('this:', this)
  349. // console.log('event:', event)
  350. // this.$refs.purchaseAmountModal.purchaseAmountModVis = true
  351. }
  352. }
  353. }
  354. },
  355. // 查询按钮
  356. searchQuery() {
  357. // 渲染订单销售列表
  358. },
  359. searchReset() {
  360. // console.log('>>>>重置')
  361. this.queryParam = {}
  362. },
  363. onClose() {
  364. // 关闭抽屉
  365. this.visible = false
  366. }
  367. },
  368. computed: {},
  369. mounted() {}
  370. }
  371. </script>
  372. <style lang="less" scoped>
  373. @import '~@assets/less/common.less';
  374. @import '~@assets/less/overwriter.less';
  375. /deep/ .ant-table-thead > tr > th {
  376. text-align: center;
  377. // font-weight: 700;
  378. }
  379. /deep/ .ant-table-tbody {
  380. text-align: center;
  381. }
  382. // /deep/ th.replacecolor {
  383. // background-color: #ccc;
  384. // }
  385. </style>