commerce_list.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  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="customerName" min-width="250" show-overflow-tooltip>
  151. <template slot-scope="scope">
  152. <CopyButton :copyText="scope.row.customerName" />
  153. <span>{{ scope.row.customerName }}</span>
  154. </template>
  155. </el-table-column>
  156. <el-table-column align="left" label="使用单位" prop="refUseUnit" min-width="160" show-overflow-tooltip></el-table-column>
  157. <el-table-column align="left" label="项目名称" prop="refProjectName" min-width="160" show-overflow-tooltip></el-table-column>
  158. <!-- <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>-->
  159. <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip>
  160. <template slot-scope="scope">
  161. <CopyButton :copyText="scope.row.materialNumber" />
  162. <span>{{scope.row.materialNumber}}</span>
  163. </template>
  164. </el-table-column>
  165. <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="140" show-overflow-tooltip>
  166. <template slot-scope="scope">
  167. <CopyButton :copyText="scope.row.materialOldNumber" />
  168. <span>{{scope.row.materialOldNumber}}</span>
  169. </template>
  170. </el-table-column>
  171. <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
  172. <template slot-scope="scope">
  173. <CopyButton :copyText="scope.row.materialName" />
  174. <span>{{scope.row.materialName}}</span>
  175. </template>
  176. </el-table-column>
  177. <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
  178. <template slot-scope="scope">
  179. <CopyButton :copyText="scope.row.specification" />
  180. <span>{{scope.row.specification}}</span>
  181. </template>
  182. </el-table-column>
  183. <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  184. <el-table-column align="right" label="总数量" prop="qty" min-width="100" sortable show-overflow-tooltip></el-table-column>
  185. <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
  186. <template slot-scope="scope">
  187. {{scope.row.isDirectTransfer ? '是':'否'}}
  188. </template>
  189. </el-table-column>
  190. <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="110" sortable show-overflow-tooltip></el-table-column>
  191. <el-table-column align="right" label="出库数量" prop="hasSendQty" min-width="110" sortable show-overflow-tooltip></el-table-column>
  192. <el-table-column align="right" label="单价" prop="price" min-width="100" sortable show-overflow-tooltip>
  193. <template slot-scope="scope">
  194. {{scope.row.price | numToFixed}}
  195. </template>
  196. </el-table-column>
  197. <el-table-column align="right" label="实付金额" prop="payAmount" min-width="110" sortable show-overflow-tooltip>
  198. <template slot-scope="scope">
  199. {{scope.row.payAmount | numToFixed}}
  200. </template>
  201. </el-table-column>
  202. <el-table-column align="left" label="返利钱包" prop="customerWalletName2" min-width="100" show-overflow-tooltip></el-table-column>
  203. <el-table-column align="right" label="使用返利金额" prop="rebateAmount" min-width="120" show-overflow-tooltip>
  204. <template slot-scope="scope">
  205. <div v-if="scope.row.examineStatus === 'OK'">{{scope.row.payRebateAmount | numToFixed}}</div>
  206. <div v-else>{{scope.row.rebateAmount | numToFixed}}</div>
  207. </template>
  208. </el-table-column>
  209. <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="110" sortable show-overflow-tooltip>
  210. <template slot-scope="scope">
  211. {{ scope.row.discAmount | numToFixed }}
  212. </template>
  213. </el-table-column>
  214. <el-table-column align="left" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  215. <el-table-column align="left" label="表头业务员" prop="serviceName" min-width="100" show-overflow-tooltip></el-table-column>
  216. <el-table-column align="left" label="表体业务员" prop="itemServiceName" min-width="100" show-overflow-tooltip></el-table-column>
  217. <el-table-column align="left" label="制表人" prop="createBy" min-width="100" show-overflow-tooltip></el-table-column>
  218. <el-table-column align="left" label="制表日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
  219. <el-table-column align="left" label="审核人" prop="confirmBy" min-width="100" show-overflow-tooltip></el-table-column>
  220. <el-table-column align="left" label="审核日期" prop="confirmTime" min-width="160" show-overflow-tooltip></el-table-column>
  221. <el-table-column align="center" label="操作" width="220" fixed="right">
  222. <template slot-scope="scope">
  223. <el-popconfirm
  224. style="margin-right: 10px;"
  225. title="确定申请吗?"
  226. @onConfirm="handleSubmit(scope.row.parentId)"
  227. v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
  228. <el-button slot="reference" type="text">申请</el-button>
  229. </el-popconfirm>
  230. <el-popconfirm
  231. style="margin-right: 10px;"
  232. title="确定撤回吗?"
  233. @onConfirm="handleWithdraw(scope.row.parentId)"
  234. v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'" >
  235. <el-button slot="reference" type="text">撤回</el-button>
  236. </el-popconfirm>
  237. <el-popconfirm
  238. style="margin-right: 10px;"
  239. title="确定弃审吗?"
  240. @onConfirm="handleAbandon(scope.row.parentId)"
  241. v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
  242. <el-button slot="reference" type="text">弃审</el-button>
  243. </el-popconfirm>
  244. <el-button
  245. type="text"
  246. @click="toForm(scope.row)"
  247. v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">
  248. 编辑
  249. </el-button>
  250. <el-button
  251. type="text"
  252. @click="toExamine(scope.row)"
  253. v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">
  254. 审批
  255. </el-button>
  256. <el-button
  257. type="text"
  258. @click="toReturn(scope.row)"
  259. v-if="$checkBtnRole('examine', $route.meta.roles)">
  260. 退订
  261. </el-button>
  262. <el-button
  263. type="text"
  264. @click="toDetail(scope.row)">
  265. 详情
  266. </el-button>
  267. <el-popconfirm
  268. style="margin-left: 10px;"
  269. title="确定删除吗?"
  270. @onConfirm="handleDelete(scope.row.parentId)"
  271. v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus !== 'OK'">
  272. <el-button slot="reference" type="text" style="color: #f56c6c;">删除</el-button>
  273. </el-popconfirm>
  274. </template>
  275. </el-table-column>
  276. </el-table>
  277. </div>
  278. </div>
  279. <div class="pagination clearfix">
  280. <div class="fr">
  281. <el-pagination
  282. @size-change="handleSizeChange"
  283. @current-change="handleCurrentChange"
  284. :current-page="currentPage"
  285. :page-sizes="[10, 20, 30, 50]"
  286. :page-size="10"
  287. layout="total, sizes, prev, pager, next, jumper"
  288. :total="listTotal">
  289. </el-pagination>
  290. </div>
  291. </div>
  292. </div>
  293. <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
  294. <CommerceDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
  295. <CommerceForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
  296. <CommerceExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
  297. <CommerceReturn :listItem="queryItem" v-if="isShowReturn" @backListFormDetail="backList" />
  298. </div>
  299. </template>
  300. <script>
  301. import { getOrderList, applyCom, withdrawCom, deleteCom, editDateCom, abandonCom } from "@/api/supply/engin";
  302. import { getSalesmanList, getTypeList } from '@/api/common'
  303. import CommerceDetail from "@/views/supply/engin/components/commerce_detail";
  304. import CommerceForm from "@/views/supply/engin/components/commerce_form";
  305. import CommerceExamine from "@/views/supply/engin/components/commerce_examine";
  306. import CommerceReturn from "@/views/supply/engin/components/commerce_return";
  307. import EditDateDialog from "@/components/Common/edit-date-dialog";
  308. let that
  309. export default {
  310. components: {
  311. CommerceDetail,
  312. CommerceForm,
  313. CommerceExamine,
  314. CommerceReturn,
  315. EditDateDialog,
  316. },
  317. filters: {
  318. statusFilter(val) {
  319. let obj = that.statusList.find(o => o.value == val);
  320. return obj ? obj.label : ''
  321. },
  322. typeFilter(val) {
  323. const MAP = {
  324. TRADE: '商用',
  325. HOME: '家用',
  326. }
  327. return MAP[val];
  328. }
  329. },
  330. data() {
  331. return {
  332. currentPage: 1, // 当前页码
  333. pageSize: 10, // 每页数量
  334. listTotal: 0, // 列表总数
  335. dataList: null, // 列表数据
  336. listLoading: false, // 列表加载loading
  337. screenForm: { // 筛选表单数据
  338. status: [],
  339. orderNum: '',
  340. enginNum: '',
  341. loginNum: '',
  342. enginName: '',
  343. date: '',
  344. saleType: '',
  345. createMan: '',
  346. examineMan: '',
  347. salesMan: '',
  348. dealer: '',
  349. model: '',
  350. },
  351. statusList: [
  352. { label: '已保存', value: 'SAVE' },
  353. { label: '待审核', value: 'WAIT' },
  354. { label: '审核通过', value: 'OK' },
  355. // // { label: '审核驳回', value: 'FAIL' },,
  356. { label: '已关闭', value: 'CLOSE' },
  357. ],
  358. salesmanList: [],
  359. salesTypeList: [],
  360. multipleSelection: [],
  361. queryItem: {},
  362. isShowDetail: false,
  363. isShowForm: false,
  364. isShowExamine: false,
  365. isShowReturn: false,
  366. editId: null,
  367. isShowEditDateDialog: false,
  368. dateForm: {
  369. date: '',
  370. },
  371. }
  372. },
  373. computed: {
  374. exParams() {
  375. let ids = this.multipleSelection.map(item => {
  376. return item.enginOrderNo;
  377. });
  378. return {
  379. examineStatus: this.screenForm.status.join(','),
  380. enginOrderNo: (ids && ids.length) ? ids.join(',') : this.screenForm.orderNum,
  381. refProjectNo: this.screenForm.enginNum,
  382. refEnginRecordNo: this.screenForm.loginNum,
  383. refProjectName: this.screenForm.enginName,
  384. startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
  385. endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
  386. saleTypeId: this.screenForm.saleType,
  387. createName: this.screenForm.createMan,
  388. confirmName: this.screenForm.examineMan,
  389. serviceId: this.screenForm.salesMan,
  390. customerKeyWord: this.screenForm.dealer,
  391. specification: this.screenForm.model,
  392. enginOrderType: 'TRADE', // TRADE=商用 HOME=家用
  393. }
  394. },
  395. },
  396. beforeCreate() {
  397. that = this;
  398. },
  399. created() {
  400. this.getSalesTypeList();
  401. this.getSalesmanList();
  402. this.getList();
  403. },
  404. methods: {
  405. // 获取业务员列表
  406. getSalesmanList() {
  407. getSalesmanList({
  408. pageNum: 1,
  409. pageSize: -1,
  410. isCustomer: 0,
  411. status: true,
  412. }).then(res => {
  413. this.salesmanList = res.data.records;
  414. })
  415. },
  416. // 获取销售类型列表
  417. getSalesTypeList() {
  418. getTypeList({
  419. pageNum: 1,
  420. pageSize: -1
  421. }).then((res) => {
  422. this.salesTypeList = res.data.records;
  423. })
  424. },
  425. // 查询列表
  426. getList() {
  427. this.listLoading = true;
  428. let params = {
  429. pageNum: this.currentPage,
  430. pageSize: this.pageSize,
  431. examineStatus: this.screenForm.status.join(','),
  432. enginOrderNo: this.screenForm.orderNum,
  433. refProjectNo: this.screenForm.enginNum,
  434. refEnginRecordNo: this.screenForm.loginNum,
  435. refProjectName: this.screenForm.enginName,
  436. startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
  437. endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
  438. saleTypeId: this.screenForm.saleType,
  439. createName: this.screenForm.createMan,
  440. confirmName: this.screenForm.examineMan,
  441. serviceId: this.screenForm.salesMan,
  442. customerKeyword: this.screenForm.dealer,
  443. specification: this.screenForm.model,
  444. enginOrderType: 'TRADE', // TRADE=商用 HOME=家用
  445. };
  446. getOrderList(params).then((res) => {
  447. res.data.records.forEach(item => {
  448. item.sums1 = ['qty', 'directTransferQty', 'hasSendQty'];
  449. item.sums2 = ['price', 'payAmount', 'discAmount'];
  450. })
  451. this.dataList = res.data.records;
  452. this.listTotal = res.data.total;
  453. this.listLoading = false;
  454. })
  455. },
  456. // 提交筛选表单
  457. submitScreenForm() {
  458. this.currentPage = 1;
  459. this.getList();
  460. },
  461. // 重置筛选表单
  462. resetScreenForm() {
  463. this.$refs.screenForm.resetFields();
  464. this.currentPage = 1;
  465. this.getList();
  466. },
  467. // 更改每页数量
  468. handleSizeChange(val) {
  469. this.pageSize = val;
  470. this.currentPage = 1;
  471. this.getList();
  472. },
  473. // 更改当前页
  474. handleCurrentChange(val) {
  475. this.currentPage = val;
  476. this.getList();
  477. },
  478. // 进入表单
  479. toForm(item) {
  480. this.queryItem = item;
  481. this.isShowForm = true;
  482. },
  483. // 进入审批
  484. toExamine(item) {
  485. this.queryItem = item;
  486. this.isShowExamine = true;
  487. },
  488. // 进入详情
  489. toDetail(item) {
  490. this.queryItem = item;
  491. this.isShowDetail = true;
  492. },
  493. // 进入退订
  494. toReturn(item) {
  495. this.queryItem = item;
  496. this.isShowReturn = true;
  497. },
  498. backList() {
  499. this.queryItem = {};
  500. this.isShowDetail = false;
  501. this.isShowForm = false;
  502. this.isShowExamine = false;
  503. this.isShowReturn = false;
  504. },
  505. // 申请
  506. handleSubmit(id) {
  507. applyCom({id}).then(res => {
  508. this.$successMsg();
  509. this.getList();
  510. })
  511. },
  512. // 撤回
  513. handleWithdraw(id) {
  514. withdrawCom({id}).then(res => {
  515. this.$successMsg();
  516. this.getList();
  517. })
  518. },
  519. // 弃审
  520. handleAbandon(id) {
  521. abandonCom({id}).then(res => {
  522. this.$successMsg();
  523. this.getList();
  524. })
  525. },
  526. // 删除
  527. handleDelete(id) {
  528. deleteCom({ids: id}).then(res => {
  529. this.$successMsg();
  530. this.getList();
  531. })
  532. },
  533. // 批量删除
  534. batchDelete() {
  535. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  536. confirmButtonText: '确定',
  537. cancelButtonText: '取消',
  538. type: 'warning'
  539. }).then(() => {
  540. let ids = this.multipleSelection.map(item => {
  541. return item.parentId;
  542. });
  543. deleteCom({ids: ids.join(',')}).then(res => {
  544. this.$successMsg();
  545. this.getList();
  546. })
  547. }).catch(() => {});
  548. },
  549. handleSelectionChange(val) {
  550. this.multipleSelection = val;
  551. },
  552. // 打开 修改订单日期
  553. editDate(item) {
  554. this.editId = item.parentId;
  555. this.dateForm.date = item.orderDate.slice(0, 10);
  556. this.isShowEditDateDialog = true;
  557. },
  558. // 提交 修改订单日期
  559. submitDateForm() {
  560. editDateCom({
  561. enginOrderId: this.editId,
  562. orderDate: this.dateForm.date + ' 00:00:00',
  563. }).then(res => {
  564. this.isShowEditDateDialog = false;
  565. this.getList();
  566. this.$successMsg('修改成功');
  567. })
  568. },
  569. }
  570. }
  571. </script>
  572. <style lang="scss" scoped>
  573. </style>