index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. class="queryForm"
  6. ref="queryForm"
  7. size="small"
  8. :inline="true"
  9. v-show="showSearch"
  10. >
  11. <el-row>
  12. <el-col :span="24">
  13. <el-form-item label="单据编号" prop="orderNumber">
  14. <el-input
  15. v-model="queryParams.orderNumber"
  16. placeholder="请输入单据编号"
  17. clearable
  18. @keyup.enter.native="handleQuery"
  19. disabled
  20. />
  21. </el-form-item>
  22. </el-col>
  23. </el-row>
  24. <el-form-item label="资产编号" prop="assetNumber">
  25. <template>
  26. <el-select
  27. v-model="queryParams.assetNumber"
  28. filterable
  29. placeholder="请输入资产编号"
  30. >
  31. <el-option
  32. v-for="item in informationList"
  33. :key="item.number"
  34. :label="item.name"
  35. :value="item.number"
  36. >
  37. <span style="float: left">{{ item.name }}</span>
  38. <span style="float: right; color: #8492a6; font-size: 13px">{{ item.number }}</span>
  39. </el-option>
  40. </el-select>
  41. </template>
  42. </el-form-item>
  43. <el-form-item
  44. v-if="orderInfo.orderType === 2"
  45. label="【调拨】旧管理人"
  46. prop="allocationOldResponsiblePerson"
  47. >
  48. <el-input
  49. v-model="queryParams.allocationOldResponsiblePerson"
  50. placeholder="请输入【调拨】旧管理人"
  51. clearable
  52. @keyup.enter.native="handleQuery"
  53. />
  54. </el-form-item>
  55. <el-form-item
  56. v-if="orderInfo.orderType === 2"
  57. label="【调拨】旧功能位置"
  58. prop="allocationOldLocationNumber"
  59. >
  60. <!-- <el-input
  61. v-model="queryParams.allocationOldLocationNumber"
  62. placeholder="请输入【调拨】旧功能位置编号"
  63. clearable
  64. @keyup.enter.native="handleQuery"
  65. /> -->
  66. <treeselect v-model="queryParams.allocationOldLocationNumber" :options="locationList" :normalizer="tenantIdnormalizer" placeholder="【调拨】旧功能位置" />
  67. </el-form-item>
  68. <el-form-item
  69. v-if="orderInfo.orderType === 2"
  70. label="【调拨】新管理人"
  71. prop="allocationNewResponsiblePerson"
  72. >
  73. <el-input
  74. v-model="queryParams.allocationNewResponsiblePerson"
  75. placeholder="请输入【调拨】新管理人"
  76. clearable
  77. @keyup.enter.native="handleQuery"
  78. />
  79. </el-form-item>
  80. <el-form-item
  81. v-if="orderInfo.orderType === 2"
  82. label="【调拨】新功能位置"
  83. prop="allocationNewLocationNumber"
  84. >
  85. <!-- <el-select
  86. v-model="queryParams.allocationNewLocationNumber"
  87. placeholder="请选择【调拨】新功能位置"
  88. >
  89. <el-option
  90. v-for="item in locationList"
  91. :key="item.number"
  92. :label="item.name"
  93. :value="item.number"
  94. ></el-option>
  95. </el-select> -->
  96. <treeselect v-model="queryParams.allocationNewLocationNumber" :options="locationList" :normalizer="tenantIdnormalizer" placeholder="【调拨】新功能位置" />
  97. </el-form-item>
  98. <el-form-item
  99. v-if="orderInfo.orderType === 3"
  100. label="【借出】预计归还时间"
  101. prop="lendReturnDate"
  102. >
  103. <el-date-picker
  104. clearable
  105. v-model="queryParams.lendReturnDate"
  106. type="date"
  107. value-format="yyyy-MM-dd"
  108. placeholder="请选择【借出】预计归还时间"
  109. >
  110. </el-date-picker>
  111. </el-form-item>
  112. <el-form-item
  113. v-if="orderInfo.orderType === 3"
  114. label="【借出】实际归还时间"
  115. prop="lendActualReturnDate"
  116. >
  117. <el-date-picker
  118. clearable
  119. v-model="queryParams.lendActualReturnDate"
  120. type="date"
  121. value-format="yyyy-MM-dd"
  122. placeholder="请选择【借出】实际归还时间"
  123. >
  124. </el-date-picker>
  125. </el-form-item>
  126. <el-form-item
  127. v-if="orderInfo.orderType === 3"
  128. label="【借出】归还经手人"
  129. prop="lendBySponsor"
  130. >
  131. <el-input
  132. v-model="queryParams.lendBySponsor"
  133. placeholder="请输入【借出】归还经手人"
  134. clearable
  135. @keyup.enter.native="handleQuery"
  136. />
  137. </el-form-item>
  138. <el-form-item>
  139. <el-button
  140. type="primary"
  141. icon="el-icon-search"
  142. size="mini"
  143. @click="handleQuery"
  144. >搜索</el-button
  145. >
  146. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  147. >重置</el-button
  148. >
  149. </el-form-item>
  150. </el-form>
  151. <el-row :gutter="10" class="mb8">
  152. <el-col
  153. :span="1.5"
  154. v-if="orderInfo.id === null || orderInfo.recordStatus < 1"
  155. >
  156. <el-button
  157. type="primary"
  158. plain
  159. icon="el-icon-plus"
  160. size="mini"
  161. @click="handleAdd"
  162. v-hasPermi="['order:detail:add']"
  163. >新增</el-button
  164. >
  165. </el-col>
  166. <el-col
  167. :span="1.5"
  168. v-if="orderInfo.id === null || orderInfo.recordStatus < 1"
  169. >
  170. <el-button
  171. type="success"
  172. plain
  173. icon="el-icon-edit"
  174. size="mini"
  175. :disabled="single"
  176. @click="handleUpdate"
  177. v-hasPermi="['order:detail:edit']"
  178. >修改</el-button
  179. >
  180. </el-col>
  181. <el-col
  182. :span="1.5"
  183. v-if="orderInfo.id === null || orderInfo.recordStatus < 1"
  184. >
  185. <el-button
  186. type="danger"
  187. plain
  188. icon="el-icon-delete"
  189. size="mini"
  190. :disabled="multiple"
  191. @click="handleDelete"
  192. v-hasPermi="['order:detail:remove']"
  193. >删除</el-button
  194. >
  195. </el-col>
  196. <el-col :span="1.5">
  197. <el-button
  198. type="warning"
  199. plain
  200. icon="el-icon-download"
  201. size="mini"
  202. @click="handleExport"
  203. v-hasPermi="['order:detail:export']"
  204. >导出</el-button
  205. >
  206. </el-col>
  207. <right-toolbar
  208. :showSearch.sync="showSearch"
  209. @queryTable="getList"
  210. ></right-toolbar>
  211. </el-row>
  212. <el-table
  213. v-loading="loading"
  214. :data="detailList"
  215. @selection-change="handleSelectionChange"
  216. >
  217. <el-table-column type="selection" width="55" align="center" />
  218. <el-table-column label="编号" align="center" prop="id" />
  219. <!-- <el-table-column label="单据编号" align="center" prop="orderNumber" /> -->
  220. <el-table-column label="资产编号" align="center" prop="assetNumber" >
  221. <template slot-scope="scope">
  222. <span>{{ scope.row.assetNumber != null ? getAssetName(scope.row.assetNumber) : ""}}</span>
  223. </template>
  224. </el-table-column>
  225. <el-table-column
  226. v-if="orderInfo.orderType === 2"
  227. label="【调拨】旧管理人"
  228. align="center"
  229. prop="allocationOldResponsiblePerson"
  230. />
  231. <el-table-column
  232. v-if="orderInfo.orderType === 2"
  233. label="【调拨】旧功能位置编号"
  234. align="center"
  235. prop="allocationOldLocationNumber"
  236. />
  237. <el-table-column
  238. v-if="orderInfo.orderType === 2"
  239. label="【调拨】新管理人"
  240. align="center"
  241. prop="allocationNewResponsiblePerson"
  242. />
  243. <el-table-column
  244. v-if="orderInfo.orderType === 2"
  245. label="【调拨】新功能位置编号"
  246. align="center"
  247. prop="allocationNewLocationNumber"
  248. />
  249. <el-table-column
  250. v-if="orderInfo.orderType === 3"
  251. label="【借出】预计归还时间"
  252. align="center"
  253. prop="lendReturnDate"
  254. width="180"
  255. >
  256. <template slot-scope="scope">
  257. <span>{{ parseTime(scope.row.lendReturnDate, "{y}-{m}-{d}") }}</span>
  258. </template>
  259. </el-table-column>
  260. <el-table-column
  261. v-if="orderInfo.orderType === 3"
  262. label="【借出】实际归还时间"
  263. align="center"
  264. prop="lendActualReturnDate"
  265. width="180"
  266. >
  267. <template slot-scope="scope">
  268. <span>{{
  269. parseTime(scope.row.lendActualReturnDate, "{y}-{m}-{d}")
  270. }}</span>
  271. </template>
  272. </el-table-column>
  273. <el-table-column
  274. v-if="orderInfo.orderType === 3"
  275. label="【借出】归还经手人"
  276. align="center"
  277. prop="lendBySponsor"
  278. />
  279. <el-table-column label="备注" align="center" prop="remark" />
  280. <el-table-column
  281. label="操作"
  282. align="center"
  283. class-name="small-padding fixed-width"
  284. >
  285. <template slot-scope="scope">
  286. <el-button
  287. v-if="orderInfo.orderType === 3 && orderInfo.recordStatus > 1"
  288. size="mini"
  289. type="text"
  290. icon="el-icon-position"
  291. @click="onReturn(scope.row)"
  292. v-hasPermi="['order:order:edit']"
  293. >归还</el-button
  294. >
  295. <el-button
  296. :disabled="orderInfo.recordStatus > 0"
  297. size="mini"
  298. type="text"
  299. icon="el-icon-edit"
  300. @click="handleUpdate(scope.row)"
  301. v-hasPermi="['order:detail:edit']"
  302. >修改</el-button
  303. >
  304. <el-button
  305. :disabled="orderInfo.recordStatus > 0"
  306. size="mini"
  307. type="text"
  308. icon="el-icon-delete"
  309. @click="handleDelete(scope.row)"
  310. v-hasPermi="['order:detail:remove']"
  311. >删除</el-button
  312. >
  313. </template>
  314. </el-table-column>
  315. </el-table>
  316. <pagination
  317. v-show="total > 0"
  318. :total="total"
  319. :page.sync="queryParams.pageNum"
  320. :limit.sync="queryParams.pageSize"
  321. @pagination="getList"
  322. />
  323. <div class="btns">
  324. <el-button v-if="(orderInfo.orderType === 1 || orderInfo.existDetail || detailList.length > 0) && orderInfo.recordStatus === 0" type="warning" @click="submitFormByOrder(1)">提 交</el-button>
  325. <el-button v-if="orderInfo.recordStatus === 0" type="primary" @click="submitFormByOrder(0)">保 存</el-button>
  326. <el-button v-if="orderInfo.recordStatus === 0" @click="cancelByOrder">取 消</el-button>
  327. </div>
  328. <!-- 添加或修改单据明细对话框 -->
  329. <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
  330. <el-form ref="form" :model="form" :rules="rules" label-width="170px">
  331. <el-form-item label="单据编号" prop="orderNumber">
  332. <el-input
  333. v-model="form.orderNumber"
  334. placeholder="请输入单据编号"
  335. disabled
  336. />
  337. </el-form-item>
  338. <el-form-item label="资产编号" prop="assetNumber">
  339. <template>
  340. <el-select
  341. v-model="form.assetNumber"
  342. filterable
  343. placeholder="请输入资产编号"
  344. :disabled="orderInfo.recordStatus > 0"
  345. >
  346. <el-option
  347. v-for="item in informationList"
  348. :key="item.number"
  349. :label="item.name"
  350. :value="item.number"
  351. >
  352. <span style="float: left">{{ item.name }}</span>
  353. <span style="float: right; color: #8492a6; font-size: 13px">{{ item.number }}</span>
  354. </el-option>
  355. </el-select>
  356. </template>
  357. </el-form-item>
  358. <el-form-item
  359. v-if="orderInfo.orderType === 2"
  360. label="【调拨】旧管理人"
  361. prop="allocationOldResponsiblePerson"
  362. >
  363. <el-input
  364. v-model="form.allocationOldResponsiblePerson"
  365. placeholder="系统自动补充"
  366. disabled
  367. />
  368. </el-form-item>
  369. <el-form-item
  370. v-if="orderInfo.orderType === 2"
  371. label="【调拨】旧功能位置"
  372. prop="allocationOldLocationNumber"
  373. >
  374. <el-select
  375. v-model="form.allocationOldLocationNumber"
  376. placeholder="系统自动补充"
  377. disabled
  378. >
  379. <el-option
  380. v-for="item in locationList"
  381. :key="item.number"
  382. :label="item.name"
  383. :value="item.number"
  384. ></el-option>
  385. </el-select>
  386. <!-- <treeselect v-model="form.allocationNewLocationNumber" :options="locationList" :normalizer="tenantIdnormalizer" placeholder="请选择【调拨】新功能位置" /> -->
  387. </el-form-item>
  388. <el-form-item
  389. v-if="orderInfo.orderType === 2"
  390. label="【调拨】新管理人"
  391. prop="allocationNewResponsiblePerson"
  392. >
  393. <el-input
  394. v-model="form.allocationNewResponsiblePerson"
  395. placeholder="请输入【调拨】新管理人"
  396. />
  397. </el-form-item>
  398. <el-form-item
  399. v-if="orderInfo.orderType === 2"
  400. label="【调拨】新功能位置"
  401. prop="allocationNewLocationNumber"
  402. >
  403. <!-- <el-select
  404. v-model="form.allocationNewLocationNumber"
  405. placeholder="请选择【调拨】新功能位置"
  406. >
  407. <el-option
  408. v-for="item in locationList"
  409. :key="item.number"
  410. :label="item.name"
  411. :value="item.number"
  412. ></el-option>
  413. </el-select> -->
  414. <treeselect v-model="form.allocationNewLocationNumber" :options="locationList" :normalizer="tenantIdnormalizer" placeholder="请选择【调拨】新功能位置" />
  415. </el-form-item>
  416. <el-form-item
  417. v-if="orderInfo.orderType === 3"
  418. label="【借出】预计归还时间"
  419. prop="lendReturnDate"
  420. >
  421. <el-date-picker
  422. clearable
  423. :disabled="orderInfo.recordStatus > 0"
  424. v-model="form.lendReturnDate"
  425. type="date"
  426. value-format="yyyy-MM-dd"
  427. placeholder="请选择【借出】预计归还时间"
  428. >
  429. </el-date-picker>
  430. </el-form-item>
  431. <el-form-item
  432. v-if="orderInfo.orderType === 3"
  433. label="【借出】实际归还时间"
  434. prop="lendActualReturnDate"
  435. >
  436. <el-date-picker
  437. clearable
  438. :disabled="orderInfo.recordStatus < 2"
  439. v-model="form.lendActualReturnDate"
  440. type="date"
  441. value-format="yyyy-MM-dd"
  442. placeholder="请选择【借出】实际归还时间"
  443. >
  444. </el-date-picker>
  445. </el-form-item>
  446. <el-form-item
  447. v-if="orderInfo.orderType === 3"
  448. label="【借出】归还经手人"
  449. prop="lendBySponsor"
  450. >
  451. <el-input
  452. v-model="form.lendBySponsor"
  453. placeholder="请输入【借出】归还经手人"
  454. :disabled="orderInfo.recordStatus < 2"
  455. />
  456. </el-form-item>
  457. <el-form-item label="备注" prop="remark">
  458. <el-input
  459. v-model="form.remark"
  460. placeholder="请输入备注"
  461. :disabled="orderInfo.recordStatus > 0"
  462. />
  463. </el-form-item>
  464. </el-form>
  465. <div slot="footer" class="dialog-footer">
  466. <el-button type="primary" @click="submitForm">确 定</el-button>
  467. <el-button @click="cancel">取 消</el-button>
  468. </div>
  469. </el-dialog>
  470. </div>
  471. </template>
  472. <script>
  473. import {
  474. listDetail,
  475. getDetail,
  476. delDetail,
  477. addDetail,
  478. updateDetail,
  479. } from "@/api/order/detail";
  480. import { updateOrder } from '@/api/order/order'
  481. import { treeSelect } from "@/api/asset/location";
  482. import { listInformation2 } from "@/api/asset/information";
  483. import Treeselect from "@riophae/vue-treeselect";
  484. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  485. export default {
  486. name: "Detail",
  487. props: {
  488. orderInfo: {
  489. type: Object,
  490. default: () => {
  491. return {
  492. id: null,
  493. orderNumber: null,
  494. orderType: null,
  495. applicationDate: null,
  496. applicationDepartment: null,
  497. adjustmentAssetNumber: null,
  498. allocationCallOutDepartment: null,
  499. allocationCallOutBy: null,
  500. allocationCallOutDate: null,
  501. allocationCallInDepartment: null,
  502. allocationCallInBy: null,
  503. allocationCallInDate: null,
  504. lendDepartment: null,
  505. lendBySponsor: null,
  506. lendPassingUnit: null,
  507. reason: null,
  508. preparedBy: null,
  509. preparedDepartment: null,
  510. corporation: null,
  511. recordStatus: null,
  512. };
  513. },
  514. },
  515. },
  516. components: {
  517. Treeselect
  518. },
  519. data() {
  520. return {
  521. // 遮罩层
  522. loading: true,
  523. // 选中数组
  524. ids: [],
  525. // 非单个禁用
  526. single: true,
  527. // 非多个禁用
  528. multiple: true,
  529. // 显示搜索条件
  530. showSearch: true,
  531. // 总条数
  532. total: 0,
  533. // 单据明细表格数据
  534. detailList: [],
  535. // 所属位置表格数据
  536. locationList: [],
  537. // 资产信息表格数据
  538. informationList: [],
  539. // 弹出层标题
  540. title: "",
  541. // 是否显示弹出层
  542. open: false,
  543. // 查询参数
  544. queryParams: {
  545. pageNum: 1,
  546. pageSize: 10,
  547. orderNumber: this.orderInfo.orderNumber,
  548. assetNumber: null,
  549. allocationOldResponsiblePerson: null,
  550. allocationOldLocationNumber: null,
  551. allocationNewResponsiblePerson: null,
  552. allocationNewLocationNumber: null,
  553. lendReturnDate: null,
  554. lendActualReturnDate: null,
  555. lendBySponsor: null,
  556. },
  557. // 表单参数
  558. form: {},
  559. // 表单校验
  560. rules: {
  561. // orderNumber: [
  562. // { required: true, message: "单据编号不能为空", trigger: "blur" }
  563. // ],
  564. assetNumber: [
  565. { required: true, message: "资产编号不能为空", trigger: "blur" },
  566. ],
  567. },
  568. };
  569. },
  570. created() {
  571. this.getLocation();
  572. this.getList();
  573. },
  574. methods: {
  575. /** 查询单据明细列表 */
  576. getList() {
  577. this.loading = true;
  578. listInformation2().then((response) => {
  579. this.informationList = response.data;
  580. });
  581. listDetail(this.queryParams).then((response) => {
  582. this.detailList = response.rows;
  583. this.total = response.total;
  584. this.loading = false;
  585. });
  586. },
  587. tenantIdnormalizer(node) {
  588. return {
  589. id: node.number,
  590. label: node.label,
  591. children: node.children
  592. }
  593. },
  594. /** 获取所属位置 */
  595. getLocation() {
  596. treeSelect().then((response) => {
  597. this.locationList = response.data;
  598. });
  599. },
  600. getAssetName(val){
  601. let arr = this.informationList.filter(item => item.number===val);
  602. if (arr.length === 0) {
  603. return ''
  604. }
  605. return arr[0].name
  606. },
  607. // 取消按钮
  608. cancel() {
  609. this.open = false;
  610. this.reset();
  611. },
  612. cancelByOrder() {
  613. this.$emit('cancelByOrder', 1)
  614. },
  615. // 表单重置
  616. reset() {
  617. this.form = {
  618. id: null,
  619. orderNumber: this.orderInfo.orderNumber,
  620. assetNumber: null,
  621. allocationOldResponsiblePerson: null,
  622. allocationOldLocationNumber: null,
  623. allocationNewResponsiblePerson: null,
  624. allocationNewLocationNumber: null,
  625. lendReturnDate: null,
  626. lendActualReturnDate: null,
  627. lendBySponsor: null,
  628. remark: null,
  629. };
  630. this.resetForm("form");
  631. },
  632. /** 搜索按钮操作 */
  633. handleQuery() {
  634. this.queryParams.pageNum = 1;
  635. this.getList();
  636. },
  637. /** 重置按钮操作 */
  638. resetQuery() {
  639. this.resetForm("queryForm");
  640. this.handleQuery();
  641. },
  642. // 多选框选中数据
  643. handleSelectionChange(selection) {
  644. this.ids = selection.map((item) => item.id);
  645. this.single = selection.length !== 1;
  646. this.multiple = !selection.length;
  647. },
  648. /** 新增按钮操作 */
  649. handleAdd() {
  650. this.reset();
  651. this.form.orderNumber = this.orderInfo.orderNumber;
  652. this.open = true;
  653. this.title = "添加单据明细";
  654. },
  655. /** 修改按钮操作 */
  656. handleUpdate(row) {
  657. this.reset();
  658. const id = row.id || this.ids;
  659. getDetail(id).then((response) => {
  660. this.form = response.data;
  661. this.open = true;
  662. this.title = "修改单据明细";
  663. });
  664. },
  665. onReturn(row) {
  666. this.reset();
  667. const id = row.id || this.ids;
  668. getDetail(id).then((response) => {
  669. this.form = response.data;
  670. this.open = true;
  671. this.title = "归还单据信息";
  672. });
  673. },
  674. /** 提交按钮 */
  675. submitForm() {
  676. this.$refs["form"].validate((valid) => {
  677. if (valid) {
  678. if (this.form.id != null) {
  679. updateDetail(this.form).then((response) => {
  680. this.$modal.msgSuccess("修改成功");
  681. this.open = false;
  682. this.getList();
  683. });
  684. } else {
  685. addDetail(this.form).then((response) => {
  686. this.$modal.msgSuccess("新增成功");
  687. this.open = false;
  688. this.getList();
  689. });
  690. }
  691. }
  692. });
  693. },
  694. /** 提交按钮 */
  695. submitFormByOrder(recordStatus) {
  696. let form = this.orderInfo
  697. form.recordStatus = recordStatus
  698. updateOrder(form).then((response) => {
  699. if (recordStatus === 0) {
  700. this.$modal.msgSuccess('保存成功')
  701. } else {
  702. this.$modal.msgSuccess('提交成功')
  703. }
  704. this.cancelByOrder()
  705. })
  706. },
  707. /** 删除按钮操作 */
  708. handleDelete(row) {
  709. const ids = row.id || this.ids;
  710. this.$modal
  711. .confirm('是否确认删除单据明细编号为"' + ids + '"的数据项?')
  712. .then(function () {
  713. return delDetail(ids);
  714. })
  715. .then(() => {
  716. this.getList();
  717. this.$modal.msgSuccess("删除成功");
  718. })
  719. .catch(() => {});
  720. },
  721. /** 导出按钮操作 */
  722. handleExport() {
  723. this.download(
  724. "order/detail/export",
  725. {
  726. ...this.queryParams,
  727. },
  728. `detail_${new Date().getTime()}.xlsx`
  729. );
  730. },
  731. },
  732. };
  733. </script>
  734. <style lang="less" scoped>
  735. /deep/ .vue-treeselect {
  736. display: inline-block;
  737. }
  738. .btns{
  739. margin-top: 50px;
  740. text-align: center;
  741. }
  742. .queryForm {
  743. /deep/ .vue-treeselect {
  744. width: 205px;
  745. height: 32px;
  746. }
  747. }
  748. </style>