engin_list.vue 25 KB

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