index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. <template>
  2. <div class="purchaseOrder pagePadding">
  3. <div v-if="powers.some((i) => i == '001')">
  4. <ex-table
  5. v-loading="loading"
  6. :table="table"
  7. :data="tableData"
  8. :columns="columns"
  9. :page="pageInfo"
  10. :size="size"
  11. @page-curr-change="handlePageChange"
  12. @page-size-change="handleSizeChange"
  13. @screen-reset="
  14. pageInfo.curr = 1;
  15. parmValue.page = 1;
  16. searchList();
  17. "
  18. @screen-submit="
  19. pageInfo.curr = 1;
  20. parmValue.page = 1;
  21. searchList();
  22. "
  23. @selection="selection_change"
  24. >
  25. <template #table-header="{}">
  26. <div style="width: 100%">
  27. <el-row style="padding: 0 0 0 80px">
  28. <el-col :span="4" style="width: 150px">
  29. <el-select
  30. :size="searchSize"
  31. v-model="parmValue.status"
  32. filterable
  33. clearable
  34. placeholder="采购单状态"
  35. style="width: 100%"
  36. @change="
  37. pageInfo.curr = 1;
  38. parmValue.page = 1;
  39. searchList();
  40. "
  41. >
  42. <el-option
  43. v-for="item in statusOptions"
  44. :key="'status' + item.value"
  45. :label="item.label"
  46. :value="item.value"
  47. />
  48. </el-select>
  49. </el-col>
  50. <el-col :span="4" style="width: 130px; padding: 0 0 0 10px">
  51. <el-dropdown @command="handleClick($event)" :size="searchSize">
  52. <el-button :size="searchSize" style="width: 120px">
  53. {{ sselect }}
  54. <i class="el-icon-arrow-down el-icon--right" :size="searchSize"></i>
  55. </el-button>
  56. <el-dropdown-menu slot="dropdown">
  57. <el-dropdown-item
  58. v-for="item in options"
  59. :key="item"
  60. :command="item"
  61. >{{ item }}</el-dropdown-item
  62. >
  63. </el-dropdown-menu>
  64. </el-dropdown>
  65. </el-col>
  66. <el-col :span="4" style="width: 303px; padding: 0 0 0 10px">
  67. <period-date-picker
  68. :type="1"
  69. :width="'135px'"
  70. :size="searchSize"
  71. :start="timeOBJ.start"
  72. :end="timeOBJ.end"
  73. @timeReturned="handleTime"
  74. />
  75. </el-col>
  76. <el-col :span="3" style="width: 66px; float: right">
  77. <el-button
  78. :size="searchSize"
  79. type="primary"
  80. style="float: right; margin-left: 5px"
  81. @click="searchList"
  82. >
  83. 刷新
  84. </el-button>
  85. </el-col>
  86. <el-col
  87. :span="4"
  88. style="width: 150px; float: right"
  89. v-if="powers.some((i) => i == '089') && !isSupertube"
  90. >
  91. <el-button
  92. type="primary"
  93. @click="statusConfirm"
  94. :size="searchSize"
  95. class="fr"
  96. >
  97. 批量已与供应商确认
  98. </el-button>
  99. </el-col>
  100. </el-row>
  101. <el-row style="padding: 10px 0 0 0">
  102. <el-col :span="4" style="width: 130px; margin-right:10px">
  103. <el-select
  104. :size="searchSize"
  105. v-model="parmValue.order_type"
  106. filterable
  107. clearable
  108. placeholder="商品类型"
  109. style="width: 100%"
  110. @change="
  111. pageInfo.curr = 1;
  112. parmValue.page = 1;
  113. searchList();
  114. "
  115. >
  116. <el-option
  117. v-for="item in cg_order_type_options"
  118. :key="'order_type' + item.id"
  119. :label="item.label"
  120. :value="item.id"
  121. />
  122. </el-select>
  123. </el-col>
  124. <el-col :span="4" style="width: 130px; margin-right:10px">
  125. <el-select
  126. :size="searchSize"
  127. v-model="parmValue.order_source"
  128. filterable
  129. clearable
  130. placeholder="订单来源"
  131. style="width: 100%"
  132. @change="
  133. pageInfo.curr = 1;
  134. parmValue.page = 1;
  135. searchList();
  136. "
  137. >
  138. <el-option
  139. v-for="item in cg_order_source_options"
  140. :key="'order_type' + item.id"
  141. :label="item.label"
  142. :value="item.id"
  143. />
  144. </el-select>
  145. </el-col>
  146. <el-col :span="4">
  147. <search-supplier
  148. :size="'mini'"
  149. style="width: 220px"
  150. :value="supplierNo"
  151. :disabled="false"
  152. :placeholder="'供应商名称'"
  153. :names="''"
  154. :isDetail="false"
  155. :noDisabled="true"
  156. @searchChange="supplierChange"
  157. />
  158. </el-col>
  159. <el-col :span="4" style="width: 66px; float: right">
  160. <el-button
  161. type="warning"
  162. class="fr"
  163. :size="searchSize"
  164. @click="restSearch"
  165. >
  166. 重置
  167. </el-button>
  168. </el-col>
  169. <!-- 暂时注释,下版需要导出 -->
  170. <el-col
  171. :span="4"
  172. style="width: 66px; float: right"
  173. v-if="powers.some((i) => i == '087')"
  174. >
  175. <el-button
  176. type="primary"
  177. style="margin-left: 30px"
  178. @click="download"
  179. :size="searchSize"
  180. class="fr"
  181. >
  182. 导出
  183. </el-button>
  184. </el-col>
  185. </el-row>
  186. <el-row>
  187. <el-col :span="6" style="width: 500px; margin-top: 10px">
  188. <el-input
  189. clearable
  190. placeholder="关键字"
  191. v-model="input"
  192. maxlength="40"
  193. :size="searchSize"
  194. class="input-with-select"
  195. @blur="
  196. pageInfo.curr = 1;
  197. parmValue.page = 1;
  198. searchList();
  199. "
  200. >
  201. <el-select
  202. v-model="select"
  203. style="width: 125px"
  204. slot="prepend"
  205. placeholder="关键字类型"
  206. @change="
  207. pageInfo.curr = 1;
  208. parmValue.page = 1;
  209. searchList();
  210. "
  211. >
  212. <el-option label="采购单编号" value="1"></el-option>
  213. <!-- <el-option label="入库单编号" value="2"></el-option> -->
  214. <!-- 列表未渲染备库编号,注释 -->
  215. <!-- <el-option label="备库编号" value="3"></el-option> -->
  216. <el-option label="商品成本编号" value="4"></el-option>
  217. <el-option label="商品名称" value="5"></el-option>
  218. <el-option label="商品创建人" value="6"></el-option>
  219. <!-- <el-option label="采购供应商编号" value="7"></el-option> -->
  220. <!-- <el-option label="采购供应商名称" value="10"></el-option> -->
  221. <el-option label="订单编号" value="8"></el-option>
  222. <el-option label="商品创建人部门" value="9"></el-option>
  223. </el-select>
  224. </el-input>
  225. </el-col>
  226. </el-row>
  227. </div>
  228. </template>
  229. <template #good_name="{ scope }">
  230. <span>{{ scope.row.good_name }}</span>
  231. <span v-for="(si, i) in scope.row.speclist" :key="si.spec_id + i">
  232. {{ i === 0 ? "__" : "--" }}{{ si.spec_name }}[{{ si.spec_value }}]
  233. </span>
  234. </template>
  235. <template #status="{ scope }">
  236. <el-tag
  237. :size="tablebtnSize"
  238. v-text="
  239. (statusOptions.find((item) => item.value == scope.row.status) || {})
  240. .label || '--'
  241. "
  242. ></el-tag>
  243. </template>
  244. <template #order_id="{ scope }">
  245. <el-tag
  246. :size="tablebtnSize"
  247. v-text="
  248. (
  249. cg_order_type_options.find((item) => item.id == scope.row.order_type) ||
  250. {}
  251. ).label || '--'
  252. "
  253. ></el-tag>
  254. </template>
  255. <template #order_source="{ scope }">
  256. <el-tag
  257. :size="tablebtnSize"
  258. v-text="
  259. (
  260. cg_order_source_options.find((item) => item.id == scope.row.order_source) ||
  261. {}
  262. ).label || '--'
  263. "
  264. ></el-tag>
  265. </template>
  266. <template #operation="{ scope }">
  267. <el-tooltip
  268. v-if="powers.some((i) => i == '007')"
  269. effect="dark"
  270. content="详情"
  271. placement="top"
  272. >
  273. <i
  274. class="el-icon-view tb-icon"
  275. @click="getRouter('purchaseOrderDetail', scope.row.cgdNo)"
  276. ></i>
  277. </el-tooltip>
  278. </template>
  279. </ex-table>
  280. </div>
  281. <div v-else>
  282. <no-auth></no-auth>
  283. </div>
  284. </div>
  285. </template>
  286. <script>
  287. import mixinPage from "@/mixins/elPaginationHandle";
  288. import resToken from "@/mixins/resToken";
  289. import urlConfig from "@/apis/url-config";
  290. import asyncRequest from "@/apis/service/purchaseIn/purchaseOrder";
  291. import { columns, statusOptions } from "./columns";
  292. import { cg_order_type_options, cg_order_source_options } from "@/assets/js/statusList";
  293. import { mapGetters } from "vuex";
  294. import companyHelper from "@/mixins/companyHelper";
  295. export default {
  296. name: "purchaseOrder",
  297. mixins: [mixinPage, resToken, companyHelper],
  298. components: {},
  299. computed: {
  300. ...mapGetters(["tablebtnSize", "searchSize", "size", "isSupertube"]),
  301. powers() {
  302. const tran =
  303. this.$store.getters.btnList.find((item) => item.menu_route == "purchaseOrder") ||
  304. {};
  305. const { action } = tran ?? {};
  306. return action ?? [];
  307. },
  308. },
  309. data() {
  310. return {
  311. is_stock: [
  312. { id: '0', name: '非库存品' },
  313. { id: '1', name: '库存品' }
  314. ],
  315. supplierNo: [],
  316. //入库公司
  317. supplierName: "",
  318. cg_order_type_options,
  319. cg_order_source_options,
  320. //入库仓库
  321. stockName: "",
  322. changeList: [],
  323. fileUrl: urlConfig.baseURL,
  324. sitem: null,
  325. select: "1",
  326. input: "",
  327. timeOBJ: {
  328. start: "", //起始时间
  329. end: "", // 结束时间
  330. },
  331. options: ["创建时间", "最晚入库时间"],
  332. sselect: "创建时间",
  333. // 状态
  334. statusOptions: statusOptions,
  335. loading: false,
  336. showModel: false,
  337. isDetail: false,
  338. modelId: 0,
  339. wsm_code: [],
  340. // wsm_supplierNo: [],
  341. parmValue: {
  342. order_source: "",
  343. orderCode: "", // 订单编号
  344. bk_code: "", // 备库编码
  345. wsm_in_code: "", // 入库单号
  346. cgdNo: "", // 采购单编码
  347. apply_name: "", // 申请人
  348. good_name: "", // 产品名称
  349. good_code: "", // 产品属性编号
  350. status: "", //状态
  351. wsm_code: "", //入货仓库编码
  352. start: "", //新建起始时间
  353. end: "", // 新建结束时间
  354. last_start: "", //最后入库时间开始
  355. last_end: "", //最后入库时间结束
  356. page: 1, // 页码
  357. size: 15, // 每页显示条数
  358. supplierNo: "",
  359. company_name: "", //部门
  360. wsm_supplierNo: "",
  361. },
  362. tableData: [],
  363. passwordModel: false,
  364. passwordModelId: 0,
  365. isPasswordDetail: false,
  366. // 表格 - 数据
  367. tableData: [],
  368. // 表格 - 参数
  369. table: {
  370. stripe: true,
  371. border: true,
  372. _defaultHeader_: ["setcol"],
  373. },
  374. // 表格 - 分页
  375. pageInfo: {
  376. size: 15,
  377. curr: 1,
  378. total: 0,
  379. },
  380. // 表格 - 列参数
  381. columns: columns,
  382. };
  383. },
  384. mounted() {
  385. const { back } = this.$route.query;
  386. if (back) {
  387. this.parmValue = JSON.parse(back);
  388. console.log(this.parmValue);
  389. const { page, size, start, end, last_start, last_end } = this.parmValue;
  390. this.timeOBJ.start = start || last_start;
  391. this.timeOBJ.end = end || last_end;
  392. this.pageInfo = {
  393. size: size,
  394. curr: page,
  395. total: 0,
  396. };
  397. //多选条件
  398. this.select = this.parmValue.select;
  399. this.sselect = this.parmValue.sselect;
  400. this.input = this.parmValue.input;
  401. //入库公司
  402. // this.supplierName = localStorage.getItem("wsm_supplierNo")
  403. // if(this.supplierName.length>0){
  404. // this.wsm_supplierNo = [this.parmValue.wsm_supplierNo];
  405. // this.stockName = localStorage.getItem("wsm_code")
  406. // this.wsm_code = [this.parmValue.wsm_code]
  407. // }
  408. // console.log(this.supplierName)
  409. } else {
  410. this.select = "1";
  411. this.sselect = "创建时间";
  412. }
  413. this.searchList();
  414. },
  415. methods: {
  416. async supplierChange(e) {
  417. const { code, label } = e;
  418. this.supplierNo = code ? [code] : [];
  419. this.searchList()
  420. },
  421. getRouter(toRouter, queryId) {
  422. if (toRouter && queryId) {
  423. let model = {
  424. id: queryId,
  425. };
  426. //有多选框的条件
  427. this.parmValue.select = this.select;
  428. this.parmValue.sselect = this.sselect;
  429. this.parmValue.input = this.input;
  430. //
  431. let routerModel = {
  432. options: JSON.parse(JSON.stringify(this.parmValue)),
  433. router: this.$route.path,
  434. };
  435. model.preModel = JSON.stringify(routerModel);
  436. this.routeGoto(toRouter, model);
  437. } else {
  438. this.$message.warning("暂未找到相关流程!");
  439. }
  440. },
  441. //选中触发函数
  442. selection_change(e) {
  443. const { list } = e;
  444. //选中的数组集合
  445. this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
  446. },
  447. //导出文件
  448. async download() {
  449. if (this.changeList.length <= 0) {
  450. this.$message.warning("请选择有效数据");
  451. return;
  452. }
  453. let model = {
  454. cgdNos: [],
  455. };
  456. this.changeList.forEach((item) => {
  457. model.cgdNos.push(item.cgdNo);
  458. });
  459. // const res = await asyncRequest.exportcgdlist(model)
  460. if (!this.loading) {
  461. this.loading = true;
  462. let httpType = `aplication/zip`;
  463. axios({
  464. method: "post",
  465. url: this.fileUrl + "admin/exportcgdlist",
  466. responseType: "blob",
  467. data: model,
  468. headers: {
  469. // 'Content-Type': 'multipart/form-data',
  470. // Accept: "application/vnd.ms-excel"
  471. Accept: httpType,
  472. },
  473. })
  474. .then((res) => {
  475. // console.log(res)
  476. // console.log(this.fileUrl)
  477. // return;
  478. if (res && res.status == 200 && res.data) {
  479. let url = window.URL.createObjectURL(
  480. new Blob([res.data], {
  481. // type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
  482. type: httpType,
  483. })
  484. );
  485. let link = document.createElement("a");
  486. link.style.display = "none";
  487. link.href = url;
  488. let excelName = "采购单.zip";
  489. link.setAttribute("download", excelName);
  490. document.body.appendChild(link);
  491. link.click();
  492. link.remove();
  493. window.URL.revokeObjectURL(url); //释放掉blob对象
  494. this.$message.success(`${message}导出成功!`);
  495. setTimeout(() => {
  496. this.loading = false;
  497. }, 500);
  498. } else {
  499. this.$message.error(res.data.message);
  500. setTimeout(() => {
  501. this.loading = false;
  502. }, 500);
  503. }
  504. })
  505. .catch((error) => {
  506. console.log(error);
  507. this.loading = false;
  508. });
  509. }
  510. },
  511. async statusConfirm() {
  512. if (this.changeList.length <= 0) {
  513. this.$message.warning("至少选择一条采购单数据!");
  514. return;
  515. }
  516. let isok = true,
  517. iss = false,
  518. list = [],
  519. errorList = [];
  520. this.changeList.forEach((e) => {
  521. if (e.status + "" !== "0") {
  522. isok = false;
  523. }
  524. if (
  525. e.has_account + "" !== "0" &&
  526. (e.order_type + "" === "2" ||
  527. e.order_type + "" === "3" ||
  528. e.order_type + "" === "4")
  529. ) {
  530. iss = true;
  531. errorList.push(e.cgdNo);
  532. }
  533. list.push(e.cgdNo);
  534. });
  535. if (!isok) {
  536. this.$message.warning("只能选择待与供应商确认的采购单!");
  537. return;
  538. }
  539. // if (iss) {
  540. // let htmlList = "<ul>";
  541. // errorList.forEach((v) => {
  542. // console.log(v);
  543. // htmlList += `<li>${v}</li>`;
  544. // });
  545. // htmlList += "</ul>";
  546. // this.$notify({
  547. // title: "以下采购单对应的供应商账号已开启,不允许在本系统操作!",
  548. // dangerouslyUseHTMLString: true,
  549. // message: htmlList,
  550. // });
  551. // return;
  552. // }
  553. await this.$confirm(`确定批量确认?`, {
  554. confirmButtonText: "确定",
  555. cancelButtonText: "取消",
  556. type: "warning",
  557. })
  558. .then(async () => {
  559. let model = {
  560. cgdNo: list,
  561. status: "1",
  562. };
  563. const { code, data, message } = await asyncRequest.status(model);
  564. this.loading = false;
  565. if (code === 0) {
  566. this.$notify.success({
  567. title: "提交成功!",
  568. message: "",
  569. });
  570. await this.searchList();
  571. } else if (code === 1003) {
  572. this.showal(data, message, "");
  573. } else if (code >= 100 && code <= 104) {
  574. await this.logout();
  575. } else {
  576. this.$message.warning(message);
  577. }
  578. })
  579. .catch(() => {
  580. console.log("取消");
  581. });
  582. },
  583. showal(list, message, code) {
  584. let htmlList = "<ul>";
  585. list.forEach((v) => {
  586. htmlList += `<li>${code !== "" ? v[code] : v}</li>`;
  587. });
  588. htmlList += "</ul>";
  589. this.$notify({
  590. title: message,
  591. dangerouslyUseHTMLString: true,
  592. message: htmlList,
  593. });
  594. },
  595. restSearch() {
  596. this.sselect = "创建时间";
  597. this.select = "1";
  598. this.input = "";
  599. this.wsm_code = [];
  600. this.wsm_supplierNo = [];
  601. this.timeOBJ = {
  602. start: "", //起始时间
  603. end: "", // 结束时间
  604. };
  605. this.parmValue = {
  606. bk_code: "", // 备库编码
  607. wsm_in_code: "", // 入库单号
  608. cgdNo: "", // 采购单编码
  609. apply_name: "", // 申请人
  610. good_name: "", // 产品名称
  611. good_code: "", // 产品属性编号
  612. status: "", //状态
  613. wsm_code: "", //入货仓库编码
  614. start: "", //新建起始时间
  615. end: "", // 新建结束时间
  616. last_start: "", //最后入库时间开始
  617. last_end: "", //最后入库时间结束
  618. orderCode: "", //订单编号
  619. company_name: "", //部门
  620. page: 1, // 页码
  621. size: 15, // 每页显示条数
  622. };
  623. // 表格 - 分页
  624. this.pageInfo = {
  625. size: 15,
  626. curr: 1,
  627. total: 0,
  628. };
  629. this.searchList();
  630. },
  631. async handleClick(e) {
  632. this.sselect = e;
  633. this.parmValue.start = e === "创建时间" ? this.timeOBJ.start : "";
  634. this.parmValue.end = e === "创建时间" ? this.timeOBJ.end : "";
  635. this.parmValue.last_start = e !== "创建时间" ? this.timeOBJ.start : "";
  636. this.parmValue.last_end = e !== "创建时间" ? this.timeOBJ.end : "";
  637. if (
  638. !(
  639. (this.timeOBJ.start !== "" && this.timeOBJ.end === "") ||
  640. (this.timeOBJ.start === "" && this.timeOBJ.end !== "")
  641. )
  642. ) {
  643. this.parmValue.page = 1;
  644. this.pageInfo.curr = 1;
  645. await this.searchList();
  646. }
  647. },
  648. // async supplierChange(e) {
  649. // if (e && e.id) {
  650. // //入库公司
  651. // // localStorage.setItem("wsm_supplierNo",e.label)
  652. // // this.supplierName = localStorage.getItem("rkNm")
  653. // this.parmValue.wsm_supplierNo = e.code;
  654. // this.wsm_supplierNo = [e.code];
  655. // } else {
  656. // //入库公司
  657. // // localStorage.setItem("wsm_supplierNo","")
  658. // this.parmValue.wsm_supplierNo = "";
  659. // this.wsm_supplierNo = [];
  660. // }
  661. // this.parmValue.wsm_code = "";
  662. // this.wsm_code = [];
  663. // this.parmValue.page = 1;
  664. // this.pageInfo.curr = 1;
  665. // await this.searchList();
  666. // },
  667. async stockChange(e) {
  668. if (e && e.id) {
  669. //入库仓库
  670. // localStorage.setItem("wsm_code",e.label)
  671. this.parmValue.wsm_code = e.code;
  672. this.wsm_code = [e.code];
  673. } else {
  674. //入库仓库
  675. // localStorage.setItem("wsm_code","")
  676. this.parmValue.wsm_code = "";
  677. this.wsm_code = [];
  678. }
  679. this.parmValue.page = 1;
  680. this.pageInfo.curr = 1;
  681. await this.searchList();
  682. },
  683. async searchList() {
  684. if (
  685. (this.timeOBJ.start !== "" && this.timeOBJ.end === "") ||
  686. (this.timeOBJ.start === "" && this.timeOBJ.end !== "")
  687. ) {
  688. this.$message.warning("时间区间不完整!");
  689. return;
  690. }
  691. this.loading = true;
  692. this.parmValue.cgdNo = this.select === "1" ? this.input : ""; // 采购单编码
  693. this.parmValue.wsm_in_code = this.select === "2" ? this.input : ""; // 入库单号
  694. this.parmValue.bk_code = this.select === "3" ? this.input : ""; // 备库编码
  695. this.parmValue.good_code = this.select === "4" ? this.input : ""; // 产品属性编号
  696. this.parmValue.good_name = this.select === "5" ? this.input : ""; // 产品名称
  697. this.parmValue.apply_name = this.select === "6" ? this.input : ""; // 申请人
  698. // this.parmValue.supplierNo = this.select === "7" ? this.input : ""; // 采购供应商编号
  699. this.parmValue.orderCode = this.select === "8" ? this.input : ""; // 采购供应商编号
  700. this.parmValue.company_name = this.select === "9" ? this.input : ""; // 部门
  701. // this.parmValue.supplier_name = this.select === "10" ? this.input : ""; // 采购供应商名称
  702. // this.wsm_supplierNo = [];
  703. const res = await asyncRequest.list({
  704. ...this.parmValue,
  705. supplierNo:Array.isArray(this.supplierNo) ? this.supplierNo[0] : this.supplierNo,
  706. needRela: true
  707. });
  708. if (res && res.code === 0 && res.data) {
  709. this.tableData = res.data.list;
  710. this.pageInfo.total = Number(res.data.count);
  711. } else if (res && res.code >= 100 && res.code <= 104) {
  712. await this.logout();
  713. } else {
  714. this.tableData = [];
  715. this.pageInfo.total = 0;
  716. }
  717. this.loading = false;
  718. },
  719. // 时间
  720. async handleTime(e) {
  721. if (e.startTime !== "") {
  722. this.timeOBJ.start = e.startTime;
  723. } else {
  724. this.timeOBJ.start = "";
  725. }
  726. if (e.endTime !== "") {
  727. this.timeOBJ.end = e.endTime;
  728. } else {
  729. this.timeOBJ.end = "";
  730. }
  731. await this.handleClick(this.sselect);
  732. },
  733. },
  734. };
  735. </script>
  736. <style lang="scss" scoped>
  737. .purchaseOrder {
  738. // text-align: right;
  739. }
  740. </style>