commerce_list.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. <template>
  2. <div class="app-container">
  3. <div v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn">
  4. <!-- 筛选条件 -->
  5. <div class="screen-container">
  6. <el-form ref="screenForm" :model="screenForm" label-width="100px" size="mini" label-position="left">
  7. <el-row :gutter="20">
  8. <el-col :xs="24" :sm="24" :lg="24">
  9. <el-form-item prop="status" label-width="0">
  10. <el-checkbox-group v-model="screenForm.status" @change="getList()">
  11. <el-checkbox-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{item.label}}</el-checkbox-button>
  12. </el-checkbox-group>
  13. </el-form-item>
  14. </el-col>
  15. <el-col :xs="24" :sm="12" :lg="6">
  16. <el-form-item label="工程订单号" prop="orderNum">
  17. <el-input v-model="screenForm.orderNum" placeholder="请输入工程订单号"></el-input>
  18. </el-form-item>
  19. </el-col>
  20. <el-col :xs="24" :sm="12" :lg="6">
  21. <el-form-item label="工程编号" prop="enginNum">
  22. <el-input v-model="screenForm.enginNum" placeholder="请输入工程编号"></el-input>
  23. </el-form-item>
  24. </el-col>
  25. <el-col :xs="24" :sm="12" :lg="6">
  26. <el-form-item label="工程信息单号" prop="loginNum">
  27. <el-input v-model="screenForm.loginNum" placeholder="请输入工程信息单号"></el-input>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :xs="24" :sm="12" :lg="6">
  31. <el-form-item label="项目类别" prop="enginName">
  32. <el-input v-model="screenForm.enginName" placeholder="请输入项目类别"></el-input>
  33. </el-form-item>
  34. </el-col>
  35. <el-col :xs="24" :sm="12" :lg="6">
  36. <el-form-item label="单据日期" prop="date">
  37. <el-date-picker
  38. v-model="screenForm.date"
  39. type="datetimerange"
  40. range-separator="至"
  41. style="width: 100%;"
  42. value-format="yyyy-MM-dd HH:mm:ss"
  43. start-placeholder="开始日期"
  44. end-placeholder="结束日期">
  45. </el-date-picker>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :xs="24" :sm="12" :lg="6">
  49. <el-form-item label="销售类型" prop="saleType">
  50. <el-select v-model="screenForm.saleType" placeholder="选择销售类型" style="width: 100%" clearable>
  51. <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
  52. </el-select>
  53. </el-form-item>
  54. </el-col>
  55. <el-col :xs="24" :sm="12" :lg="6">
  56. <el-form-item label="经销商" prop="dealer">
  57. <el-input v-model="screenForm.dealer" placeholder="请输入经销商"></el-input>
  58. </el-form-item>
  59. </el-col>
  60. <el-col :xs="24" :sm="12" :lg="6">
  61. <el-form-item label="制表人" prop="createMan">
  62. <el-input v-model="screenForm.createMan" placeholder="请输入制表人"></el-input>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :xs="24" :sm="12" :lg="6">
  66. <el-form-item label="审核人" prop="examineMan">
  67. <el-input v-model="screenForm.examineMan" placeholder="请输入审核人"></el-input>
  68. </el-form-item>
  69. </el-col>
  70. <el-col :xs="24" :sm="12" :lg="6">
  71. <el-form-item label="业务员" prop="salesMan">
  72. <el-select v-model="screenForm.salesMan" placeholder="选择业务员" clearable filterable style="width: 100%">
  73. <el-option
  74. v-for="item in salesmanList"
  75. :key="item.adminUserId"
  76. :label="item.nickName"
  77. :value="item.adminUserId">
  78. </el-option>
  79. </el-select>
  80. </el-form-item>
  81. </el-col>
  82. <el-col :xs="24" :sm="12" :lg="6">
  83. <el-form-item label="规格型号" prop="model">
  84. <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
  85. </el-form-item>
  86. </el-col>
  87. <el-col :xs="24" :sm="12" :lg="6" class="tr">
  88. <el-form-item label="">
  89. <el-button @click="resetScreenForm">清空</el-button>
  90. <el-button type="primary" @click="submitScreenForm">搜索</el-button>
  91. </el-form-item>
  92. </el-col>
  93. </el-row>
  94. </el-form>
  95. </div>
  96. <div class="mymain-container">
  97. <div class="btn-group clearfix">
  98. <div class="fl">
  99. <el-button size="mini" type="primary" icon="el-icon-plus" @click="toForm()" v-if="$checkBtnRole('add', $route.meta.roles)">新增</el-button>
  100. <el-button size="mini" type="danger" icon="el-icon-minus" :disabled="multipleSelection.length < 1" @click="batchDelete()" v-if="$checkBtnRole('del', $route.meta.roles)">批量删除</el-button>
  101. </div>
  102. <div class="fr">
  103. <ExportButton :exUrl="'engin-order/export'" :exParams="exParams" />
  104. </div>
  105. </div>
  106. <div class="table">
  107. <el-table
  108. v-loading="listLoading"
  109. :data="dataList"
  110. element-loading-text="Loading"
  111. border
  112. fit
  113. highlight-current-row
  114. stripe
  115. @selection-change="handleSelectionChange"
  116. show-summary
  117. :summary-method="$getSummaries">
  118. <el-table-column align="center" type="selection" width="55"></el-table-column>
  119. <el-table-column align="left" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
  120. <template slot-scope="scope">
  121. {{scope.row.examineStatus | statusFilter}}
  122. </template>
  123. </el-table-column>
  124. <el-table-column align="left" label="工程订单号" prop="enginOrderNo" min-width="140" show-overflow-tooltip>
  125. <template slot-scope="scope">
  126. <CopyButton :copyText="scope.row.enginOrderNo" />
  127. <span>{{scope.row.enginOrderNo}}</span>
  128. </template>
  129. </el-table-column>
  130. <el-table-column align="left" label="订单日期" prop="orderDate" min-width="120" show-overflow-tooltip>
  131. <template slot-scope="scope">
  132. <div>
  133. <span>{{scope.row.orderDate | dateToDayFilter}}</span>
  134. <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 6px" @click="editDate(scope.row)" v-if="$checkBtnRole('date', $route.meta.roles) && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')" ></el-button>
  135. </div>
  136. </template>
  137. </el-table-column>
  138. <el-table-column align="left" label="工程编号" prop="refProjectNo" min-width="160" show-overflow-tooltip></el-table-column>
  139. <el-table-column align="left" label="工程信息单号" prop="refEnginRecordNo" min-width="200" show-overflow-tooltip>
  140. <template slot-scope="scope">
  141. <CopyButton :copyText="scope.row.refEnginRecordNo" />
  142. <span>{{scope.row.refEnginRecordNo}}</span>
  143. </template>
  144. </el-table-column>
  145. <el-table-column align="left" label="订单类型" prop="enginOrderType" min-width="100" show-overflow-tooltip>
  146. <template slot-scope="scope">
  147. {{scope.row.enginOrderType | typeFilter}}
  148. </template>
  149. </el-table-column>
  150. <el-table-column align="left" label="使用单位" prop="refUseUnit" min-width="160" show-overflow-tooltip></el-table-column>
  151. <el-table-column align="left" label="项目类别" prop="refProjectName" min-width="160" show-overflow-tooltip></el-table-column>
  152. <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
  153. <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip>
  154. <template slot-scope="scope">
  155. <CopyButton :copyText="scope.row.materialNumber" />
  156. <span>{{scope.row.materialNumber}}</span>
  157. </template>
  158. </el-table-column>
  159. <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="140" show-overflow-tooltip>
  160. <template slot-scope="scope">
  161. <CopyButton :copyText="scope.row.materialOldNumber" />
  162. <span>{{scope.row.materialOldNumber}}</span>
  163. </template>
  164. </el-table-column>
  165. <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
  166. <template slot-scope="scope">
  167. <CopyButton :copyText="scope.row.materialName" />
  168. <span>{{scope.row.materialName}}</span>
  169. </template>
  170. </el-table-column>
  171. <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
  172. <template slot-scope="scope">
  173. <CopyButton :copyText="scope.row.specification" />
  174. <span>{{scope.row.specification}}</span>
  175. </template>
  176. </el-table-column>
  177. <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  178. <el-table-column align="right" label="总数量" prop="qty" min-width="100" sortable show-overflow-tooltip></el-table-column>
  179. <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
  180. <template slot-scope="scope">
  181. {{scope.row.isDirectTransfer ? '是':'否'}}
  182. </template>
  183. </el-table-column>
  184. <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="110" sortable show-overflow-tooltip></el-table-column>
  185. <el-table-column align="right" label="出库数量" prop="hasSendQty" min-width="110" sortable show-overflow-tooltip></el-table-column>
  186. <el-table-column align="right" label="单价" prop="price" min-width="100" sortable show-overflow-tooltip>
  187. <template slot-scope="scope">
  188. {{scope.row.price | numToFixed}}
  189. </template>
  190. </el-table-column>
  191. <el-table-column align="right" label="实付金额" prop="payAmount" min-width="110" sortable show-overflow-tooltip>
  192. <template slot-scope="scope">
  193. {{scope.row.payAmount | numToFixed}}
  194. </template>
  195. </el-table-column>
  196. <el-table-column align="left" label="返利钱包" prop="customerWalletName2" min-width="100" show-overflow-tooltip></el-table-column>
  197. <el-table-column align="right" label="使用返利金额" prop="rebateAmount" min-width="120" show-overflow-tooltip>
  198. <template slot-scope="scope">
  199. <div v-if="scope.row.examineStatus === 'OK'">{{scope.row.payRebateAmount | numToFixed}}</div>
  200. <div v-else>{{scope.row.rebateAmount | numToFixed}}</div>
  201. </template>
  202. </el-table-column>
  203. <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="110" sortable show-overflow-tooltip>
  204. <template slot-scope="scope">
  205. {{ scope.row.discAmount | numToFixed }}
  206. </template>
  207. </el-table-column>
  208. <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  209. <el-table-column align="left" label="业务员" prop="itemServiceName" min-width="100" show-overflow-tooltip></el-table-column>
  210. <el-table-column align="left" label="表头业务员" prop="serviceName" min-width="100" show-overflow-tooltip></el-table-column>
  211. <el-table-column align="left" label="制表人" prop="createBy" min-width="100" show-overflow-tooltip></el-table-column>
  212. <el-table-column align="left" label="制表日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
  213. <el-table-column align="left" label="审核人" prop="confirmBy" min-width="100" show-overflow-tooltip></el-table-column>
  214. <el-table-column align="left" label="审核日期" prop="confirmTime" min-width="160" show-overflow-tooltip></el-table-column>
  215. <el-table-column align="center" label="操作" width="220" fixed="right">
  216. <template slot-scope="scope">
  217. <el-popconfirm
  218. style="margin-right: 10px;"
  219. title="确定申请吗?"
  220. @onConfirm="handleSubmit(scope.row.parentId)"
  221. v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
  222. <el-button slot="reference" type="text">申请</el-button>
  223. </el-popconfirm>
  224. <el-popconfirm
  225. style="margin-right: 10px;"
  226. title="确定撤回吗?"
  227. @onConfirm="handleWithdraw(scope.row.parentId)"
  228. v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'" >
  229. <el-button slot="reference" type="text">撤回</el-button>
  230. </el-popconfirm>
  231. <el-popconfirm
  232. style="margin-right: 10px;"
  233. title="确定弃审吗?"
  234. @onConfirm="handleAbandon(scope.row.parentId)"
  235. v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
  236. <el-button slot="reference" type="text">弃审</el-button>
  237. </el-popconfirm>
  238. <el-button
  239. type="text"
  240. @click="toForm(scope.row)"
  241. v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">
  242. 编辑
  243. </el-button>
  244. <el-button
  245. type="text"
  246. @click="toExamine(scope.row)"
  247. v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">
  248. 审批
  249. </el-button>
  250. <el-button
  251. type="text"
  252. @click="toReturn(scope.row)"
  253. v-if="$checkBtnRole('examine', $route.meta.roles)">
  254. 退订
  255. </el-button>
  256. <el-button
  257. type="text"
  258. @click="toDetail(scope.row)">
  259. 详情
  260. </el-button>
  261. <el-popconfirm
  262. style="margin-left: 10px;"
  263. title="确定删除吗?"
  264. @onConfirm="handleDelete(scope.row.parentId)"
  265. v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus !== 'OK'">
  266. <el-button slot="reference" type="text" style="color: #f56c6c;">删除</el-button>
  267. </el-popconfirm>
  268. </template>
  269. </el-table-column>
  270. </el-table>
  271. </div>
  272. </div>
  273. <div class="pagination clearfix">
  274. <div class="fr">
  275. <el-pagination
  276. @size-change="handleSizeChange"
  277. @current-change="handleCurrentChange"
  278. :current-page="currentPage"
  279. :page-sizes="[10, 20, 30, 50]"
  280. :page-size="10"
  281. layout="total, sizes, prev, pager, next, jumper"
  282. :total="listTotal">
  283. </el-pagination>
  284. </div>
  285. </div>
  286. </div>
  287. <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
  288. <CommerceDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
  289. <CommerceForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
  290. <CommerceExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
  291. <CommerceReturn :listItem="queryItem" v-if="isShowReturn" @backListFormDetail="backList" />
  292. </div>
  293. </template>
  294. <script>
  295. import { getOrderList, applyCom, withdrawCom, deleteCom, editDateCom, abandonCom } from "@/api/supply/engin";
  296. import { getSalesmanList, getTypeList } from '@/api/common'
  297. import CommerceDetail from "@/views/supply/engin/components/commerce_detail";
  298. import CommerceForm from "@/views/supply/engin/components/commerce_form";
  299. import CommerceExamine from "@/views/supply/engin/components/commerce_examine";
  300. import CommerceReturn from "@/views/supply/engin/components/commerce_return";
  301. import EditDateDialog from "@/components/Common/edit-date-dialog";
  302. let that
  303. export default {
  304. components: {
  305. CommerceDetail,
  306. CommerceForm,
  307. CommerceExamine,
  308. CommerceReturn,
  309. EditDateDialog,
  310. },
  311. filters: {
  312. statusFilter(val) {
  313. let obj = that.statusList.find(o => o.value == val);
  314. return obj ? obj.label : ''
  315. },
  316. typeFilter(val) {
  317. const MAP = {
  318. TRADE: '商用',
  319. HOME: '家用',
  320. }
  321. return MAP[val];
  322. }
  323. },
  324. data() {
  325. return {
  326. currentPage: 1, // 当前页码
  327. pageSize: 10, // 每页数量
  328. listTotal: 0, // 列表总数
  329. dataList: null, // 列表数据
  330. listLoading: false, // 列表加载loading
  331. screenForm: { // 筛选表单数据
  332. status: [],
  333. orderNum: '',
  334. enginNum: '',
  335. loginNum: '',
  336. enginName: '',
  337. date: '',
  338. saleType: '',
  339. createMan: '',
  340. examineMan: '',
  341. salesMan: '',
  342. dealer: '',
  343. model: '',
  344. },
  345. statusList: [
  346. { label: '已保存', value: 'SAVE' },
  347. { label: '待审核', value: 'WAIT' },
  348. { label: '审核通过', value: 'OK' },
  349. // { label: '审核驳回', value: 'FAIL' },
  350. { label: '已关闭', value: 'CLOSE' },
  351. ],
  352. salesmanList: [],
  353. multipleSelection: [],
  354. queryItem: {},
  355. isShowDetail: false,
  356. isShowForm: false,
  357. isShowExamine: false,
  358. isShowReturn: false,
  359. editId: null,
  360. isShowEditDateDialog: false,
  361. dateForm: {
  362. date: '',
  363. },
  364. }
  365. },
  366. computed: {
  367. exParams() {
  368. let ids = this.multipleSelection.map(item => {
  369. return item.enginOrderNo;
  370. });
  371. return {
  372. examineStatus: this.screenForm.status.join(','),
  373. enginOrderNo: (ids && ids.length) ? ids.join(',') : this.screenForm.orderNum,
  374. refProjectNo: this.screenForm.enginNum,
  375. refEnginRecordNo: this.screenForm.loginNum,
  376. refProjectName: this.screenForm.enginName,
  377. startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
  378. endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
  379. saleTypeId: this.screenForm.saleType,
  380. createName: this.screenForm.createMan,
  381. confirmName: this.screenForm.examineMan,
  382. serviceId: this.screenForm.salesMan,
  383. customerKeyWord: this.screenForm.dealer,
  384. specification: this.screenForm.model,
  385. enginOrderType: 'TRADE', // TRADE=商用 HOME=家用
  386. }
  387. },
  388. },
  389. beforeCreate() {
  390. that = this;
  391. },
  392. created() {
  393. this.getSalesTypeList();
  394. this.getSalesmanList();
  395. this.getList();
  396. },
  397. methods: {
  398. // 获取业务员列表
  399. getSalesmanList() {
  400. getSalesmanList({
  401. pageNum: 1,
  402. pageSize: -1,
  403. isCustomer: 0,
  404. status: true,
  405. }).then(res => {
  406. this.salesmanList = res.data.records;
  407. })
  408. },
  409. // 获取销售类型列表
  410. getSalesTypeList() {
  411. getTypeList({
  412. pageNum: 1,
  413. pageSize: -1
  414. }).then((res) => {
  415. this.salesTypeList = res.data.records;
  416. })
  417. },
  418. // 查询列表
  419. getList() {
  420. this.listLoading = true;
  421. let params = {
  422. pageNum: this.currentPage,
  423. pageSize: this.pageSize,
  424. examineStatus: this.screenForm.status.join(','),
  425. enginOrderNo: this.screenForm.orderNum,
  426. refProjectNo: this.screenForm.enginNum,
  427. refEnginRecordNo: this.screenForm.loginNum,
  428. refProjectName: this.screenForm.enginName,
  429. startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
  430. endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
  431. saleTypeId: this.screenForm.saleType,
  432. createName: this.screenForm.createMan,
  433. confirmName: this.screenForm.examineMan,
  434. serviceId: this.screenForm.salesMan,
  435. customerKeyword: this.screenForm.dealer,
  436. specification: this.screenForm.model,
  437. enginOrderType: 'TRADE', // TRADE=商用 HOME=家用
  438. };
  439. getOrderList(params).then((res) => {
  440. res.data.records.forEach(item => {
  441. item.sums1 = ['qty', 'directTransferQty', 'hasSendQty'];
  442. item.sums2 = ['price', 'payAmount', 'discAmount'];
  443. })
  444. this.dataList = res.data.records;
  445. this.listTotal = res.data.total;
  446. this.listLoading = false;
  447. })
  448. },
  449. // 提交筛选表单
  450. submitScreenForm() {
  451. this.currentPage = 1;
  452. this.getList();
  453. },
  454. // 重置筛选表单
  455. resetScreenForm() {
  456. this.$refs.screenForm.resetFields();
  457. this.currentPage = 1;
  458. this.getList();
  459. },
  460. // 更改每页数量
  461. handleSizeChange(val) {
  462. this.pageSize = val;
  463. this.currentPage = 1;
  464. this.getList();
  465. },
  466. // 更改当前页
  467. handleCurrentChange(val) {
  468. this.currentPage = val;
  469. this.getList();
  470. },
  471. // 进入表单
  472. toForm(item) {
  473. this.queryItem = item;
  474. this.isShowForm = true;
  475. },
  476. // 进入审批
  477. toExamine(item) {
  478. this.queryItem = item;
  479. this.isShowExamine = true;
  480. },
  481. // 进入详情
  482. toDetail(item) {
  483. this.queryItem = item;
  484. this.isShowDetail = true;
  485. },
  486. // 进入退订
  487. toReturn(item) {
  488. this.queryItem = item;
  489. this.isShowReturn = true;
  490. },
  491. backList() {
  492. this.queryItem = {};
  493. this.isShowDetail = false;
  494. this.isShowForm = false;
  495. this.isShowExamine = false;
  496. this.isShowReturn = false;
  497. },
  498. // 申请
  499. handleSubmit(id) {
  500. applyCom({id}).then(res => {
  501. this.$successMsg();
  502. this.getList();
  503. })
  504. },
  505. // 撤回
  506. handleWithdraw(id) {
  507. withdrawCom({id}).then(res => {
  508. this.$successMsg();
  509. this.getList();
  510. })
  511. },
  512. // 弃审
  513. handleAbandon(id) {
  514. abandonCom({id}).then(res => {
  515. this.$successMsg();
  516. this.getList();
  517. })
  518. },
  519. // 删除
  520. handleDelete(id) {
  521. deleteCom({ids: id}).then(res => {
  522. this.$successMsg();
  523. this.getList();
  524. })
  525. },
  526. // 批量删除
  527. batchDelete() {
  528. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  529. confirmButtonText: '确定',
  530. cancelButtonText: '取消',
  531. type: 'warning'
  532. }).then(() => {
  533. let ids = this.multipleSelection.map(item => {
  534. return item.parentId;
  535. });
  536. deleteCom({ids: ids.join(',')}).then(res => {
  537. this.$successMsg();
  538. this.getList();
  539. })
  540. }).catch(() => {});
  541. },
  542. handleSelectionChange(val) {
  543. this.multipleSelection = val;
  544. },
  545. // 打开 修改订单日期
  546. editDate(item) {
  547. this.editId = item.parentId;
  548. this.dateForm.date = item.orderDate.slice(0, 10);
  549. this.isShowEditDateDialog = true;
  550. },
  551. // 提交 修改订单日期
  552. submitDateForm() {
  553. editDateCom({
  554. enginOrderId: this.editId,
  555. orderDate: this.dateForm.date + ' 00:00:00',
  556. }).then(res => {
  557. this.isShowEditDateDialog = false;
  558. this.getList();
  559. this.$successMsg('修改成功');
  560. })
  561. },
  562. }
  563. }
  564. </script>
  565. <style lang="scss" scoped>
  566. </style>