index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="115px">
  4. <el-form-item label="供应商编码" prop="supplierCode">
  5. <el-input
  6. v-model="queryParams.supplierCode"
  7. placeholder="请输入"
  8. clearable
  9. size="small"
  10. @keyup.enter.native="handleQuery"
  11. />
  12. </el-form-item>
  13. <el-form-item label="供应商名称" prop="name">
  14. <el-input
  15. v-model="queryParams.supplierName"
  16. placeholder="请输入"
  17. clearable
  18. size="small"
  19. @keyup.enter.native="handleQuery"
  20. />
  21. </el-form-item>
  22. <el-form-item label="是否含包装" prop="">
  23. <el-select v-model="queryParams.packagingFlag" placeholder="请选择" clearable size="small" >
  24. <el-option
  25. v-for="item in packagingFlagOptions"
  26. :key="item.dictValue"
  27. :label="item.dictLabel"
  28. :value="item.dictValue"
  29. />
  30. </el-select>
  31. </el-form-item>
  32. <el-form-item label="是否包邮" prop="">
  33. <el-select v-model="queryParams.shippingFlag" placeholder="请选择" clearable size="small" >
  34. <el-option
  35. v-for="item in shippingFlagOptions"
  36. :key="item.dictValue"
  37. :label="item.dictLabel"
  38. :value="item.dictValue"
  39. />
  40. </el-select>
  41. </el-form-item>
  42. <el-form-item label="供应商商品编码" prop="supplierSpucode">
  43. <el-input
  44. v-model="queryParams.supplierSpucode"
  45. placeholder="请输入"
  46. clearable
  47. size="small"
  48. @keyup.enter.native="handleQuery"
  49. />
  50. </el-form-item>
  51. <el-form-item label="供应商SKU编码" prop="supplierSkucode">
  52. <el-input
  53. v-model="queryParams.supplierSkucode"
  54. placeholder="请输入"
  55. clearable
  56. size="small"
  57. @keyup.enter.native="handleQuery"
  58. />
  59. </el-form-item>
  60. <el-form-item label="商品编码" prop="spuCode">
  61. <el-input
  62. v-model="queryParams.spuCode"
  63. placeholder="请输入"
  64. clearable
  65. size="small"
  66. @keyup.enter.native="handleQuery"
  67. />
  68. </el-form-item>
  69. <el-form-item label="SKU编码" prop="skuCode">
  70. <el-input
  71. v-model="queryParams.skuCode"
  72. placeholder="请输入"
  73. clearable
  74. size="small"
  75. @keyup.enter.native="handleQuery"
  76. />
  77. </el-form-item>
  78. <el-form-item>
  79. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  80. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  81. </el-form-item>
  82. </el-form>
  83. <el-row :gutter="10" class="mb8">
  84. <el-col :span="1.5">
  85. <el-button
  86. type="primary"
  87. icon="el-icon-plus"
  88. size="mini"
  89. @click="handleAdd"
  90. v-hasPermi="['oms:supplierProduct:add']"
  91. >新增</el-button>
  92. </el-col>
  93. <el-col :span="1.5">
  94. <el-button
  95. type="success"
  96. icon="el-icon-edit"
  97. size="mini"
  98. :disabled="single"
  99. @click="handleUpdate"
  100. v-hasPermi="['oms:supplierProduct:edit']"
  101. >修改</el-button>
  102. </el-col>
  103. <el-col :span="1.5">
  104. <el-button
  105. type="danger"
  106. icon="el-icon-delete"
  107. size="mini"
  108. :disabled="multiple"
  109. @click="handleDelete"
  110. v-hasPermi="['oms:supplierProduct:remove']"
  111. >删除</el-button>
  112. </el-col>
  113. <el-col :span="1.5">
  114. <el-button
  115. type="warning"
  116. icon="el-icon-download"
  117. size="mini"
  118. @click="handleExport"
  119. v-hasPermi="['oms:supplierProduct:export']"
  120. >导出</el-button>
  121. </el-col>
  122. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  123. </el-row>
  124. <el-table border v-loading="loading" :data="supplierProductList" @selection-change="handleSelectionChange">
  125. <el-table-column type="selection" width="55" align="center" />
  126. <el-table-column label="序号" width="55" type="index" align="center" />
  127. <el-table-column label="id" prop="id" v-if="false"></el-table-column>
  128. <el-table-column label="商品图片" align="center" width="160">
  129. <template slot-scope="scope">
  130. <el-popover
  131. placement="right"
  132. title=""
  133. trigger="hover"
  134. >
  135. <img slot="reference" :src="scope.row.image" width="100">
  136. <img :src="scope.row.image" style="max-width: 150px;">
  137. </el-popover>
  138. </template>
  139. </el-table-column>
  140. <el-table-column label="商品编码" width="160" align="center" prop="spuCode" />
  141. <el-table-column label="商品名称" width="160" show-overflow-tooltip align="center" prop="spuName" />
  142. <el-table-column label="SKU编码" width="160" align="center" prop="skuCode" />
  143. <el-table-column label="SKU名称" width="160" align="center" prop="skuName" />
  144. <el-table-column label="供应商编码" width="160" align="center" prop="supplierCode" />
  145. <el-table-column label="供应商名称" width="160" align="center" prop="name" />
  146. <el-table-column label="含税采购价" width="120" align="center" prop="taxunitPrice" />
  147. <el-table-column label="不含税采购价" width="120" align="center" prop="unitPrice" />
  148. <el-table-column label="税率" width="100" align="center" prop="taxRate" >
  149. <template v-slot="scope">
  150. {{ scope.row.taxRate }} %
  151. </template>
  152. </el-table-column>
  153. <el-table-column label="供应商SKU编码" width="160" align="center" prop="supplierSkucode" />
  154. <el-table-column label="供应商商品编码" width="160" align="center" prop="supplierSpucode" />
  155. <el-table-column label="是否含包装" width="100" align="center" prop="packagingFlag" >
  156. <template slot-scope="scope">
  157. <el-tag prop="packagingFlag" v-for="(item, index) in packagingFlagOptions" v-if="scope.row.packagingFlag==item.dictValue">{{item.dictLabel}}</el-tag>
  158. </template>
  159. </el-table-column>
  160. <el-table-column label="是否包邮" width="100" align="center" prop="shippingFlag" >
  161. <template slot-scope="scope">
  162. <el-tag prop="shippingFlag" v-for="(item, index) in shippingFlagOptions" v-if="scope.row.shippingFlag==item.dictValue">{{item.dictLabel}}</el-tag>
  163. </template>
  164. </el-table-column>
  165. <el-table-column label="备注" width="124" align="left" prop="remark" />
  166. <el-table-column label="操作" align="center" width="110" fixed="right" class-name="small-padding fixed-width">
  167. <template slot-scope="scope">
  168. <el-button
  169. size="mini"
  170. type="text"
  171. icon="el-icon-edit"
  172. @click="handleUpdate(scope.row)"
  173. v-hasPermi="['oms:supplierProduct:edit']"
  174. >修改</el-button>
  175. <el-button
  176. size="mini"
  177. type="text"
  178. icon="el-icon-delete"
  179. @click="handleDelete(scope.row)"
  180. v-hasPermi="['oms:supplierProduct:remove']"
  181. >删除</el-button>
  182. </template>
  183. </el-table-column>
  184. </el-table>
  185. <pagination
  186. v-show="total>0"
  187. :total="total"
  188. :page.sync="queryParams.pageNum"
  189. :limit.sync="queryParams.pageSize"
  190. @pagination="getList"
  191. />
  192. <!-- 添加或修改供应商商品对话框 -->
  193. <el-dialog :title="title" :visible.sync="open" width="1030px" append-to-body>
  194. <el-form ref="form" :model="form" :rules="rules" label-width="130px" >
  195. <el-form-item label="供应商编码" prop="code" v-if="false">
  196. <el-input v-model="form.supplierCode" placeholder="请输入" />
  197. </el-form-item>
  198. <el-form-item label="供应商id" prop="id" v-if="false">
  199. <el-input v-model="form.supplierId" placeholder="请输入" />
  200. </el-form-item>
  201. <el-row >
  202. <el-col :span="12">
  203. <el-form-item label="供应商" prop="name" >
  204. <el-select v-model="form.name" @change="selectSupplier">
  205. <el-option v-for="item in supplierOptions"
  206. :label="item.name"
  207. :value="item.name"/>
  208. </el-select>
  209. </el-form-item>
  210. </el-col>
  211. <el-col :span="12" >
  212. <el-form-item label="供应商商品编码" prop="supplierSpucode" >
  213. <el-input v-model="form.supplierSpucode" placeholder="请输入" />
  214. </el-form-item>
  215. </el-col>
  216. </el-row>
  217. <el-row >
  218. <el-col :span="12" >
  219. <el-form-item label="供应商SKU编码" prop="supplierSkucode">
  220. <el-input v-model="form.supplierSkucode" placeholder="请输入" />
  221. </el-form-item>
  222. </el-col>
  223. <el-col :span="12" >
  224. <el-form-item label="含税采购价" prop="taxunitPrice">
  225. <el-input v-model="form.taxunitPrice" placeholder="请输入" />
  226. </el-form-item>
  227. </el-col>
  228. </el-row>
  229. <el-row >
  230. <el-col :span="12">
  231. <el-form-item label="不含税采购价" prop="unitPrice">
  232. <el-input v-model="form.unitPrice" placeholder="请输入" />
  233. </el-form-item>
  234. </el-col>
  235. <el-col :span="12">
  236. <el-form-item label="税率" prop="taxRate">
  237. <el-input v-model="form.taxRate" placeholder="请输入" >
  238. <template slot="append">%</template>
  239. </el-input>
  240. </el-form-item>
  241. </el-col>
  242. </el-row>
  243. <el-row>
  244. <el-col :span="12">
  245. <el-form-item label="是否含包装" prop="packagingFlag">
  246. <el-radio-group v-model="form.packagingFlag">
  247. <el-radio :label="item.dictValue" v-for="item in packagingFlagOptions" >{{item.dictLabel}}</el-radio>
  248. </el-radio-group>
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="12">
  252. <el-form-item label="是否包邮" prop="shippingFlag">
  253. <el-radio-group v-model="form.shippingFlag">
  254. <el-radio :label="item.dictValue" v-for="item in shippingFlagOptions" >{{item.dictLabel}}</el-radio>
  255. </el-radio-group>
  256. </el-form-item>
  257. </el-col>
  258. </el-row>
  259. <el-row>
  260. <el-col :span="24">
  261. <el-form-item label="备注" prop="remark">
  262. <el-input v-model="form.remark" type="textarea" :rows="2" placeholder="请输入" />
  263. </el-form-item>
  264. </el-col>
  265. </el-row>
  266. <el-form-item>
  267. <el-button type="primary" plain @click="showDialog">添加商品</el-button>
  268. </el-form-item>
  269. <!-- <el-button @click="showDialog">添加商品</el-button> -->
  270. <el-row>
  271. <el-col :span="12">
  272. <el-form-item label="商品名称" prop="spuName">
  273. <el-input v-model="form.spuName" placeholder="请输入" />
  274. </el-form-item>
  275. </el-col>
  276. <el-col :span="12">
  277. <el-form-item label="商品编码" prop="spuCode">
  278. <el-input v-model="form.spuCode" placeholder="请输入商品编码" />
  279. </el-form-item>
  280. </el-col>
  281. </el-row>
  282. <el-row>
  283. <el-col :span="12">
  284. <el-form-item label="SKU编码" prop="skuCode">
  285. <el-input v-model="form.skuCode" placeholder="请输入" />
  286. </el-form-item>
  287. </el-col>
  288. <el-col :span="12">
  289. <el-form-item label="SKU名称" prop="skuName">
  290. <el-input v-model="form.skuName" placeholder="请输入" />
  291. </el-form-item>
  292. </el-col>
  293. </el-row>
  294. <el-form-item label="商品图片" prop="image">
  295. <Material v-model="imageArr" type="image" :num="1" :width="150" :height="150" />
  296. </el-form-item>
  297. </el-form>
  298. <div slot="footer" class="dialog-footer">
  299. <el-button type="primary" @click="submitForm">确 定</el-button>
  300. <el-button @click="cancel">取 消</el-button>
  301. </div>
  302. </el-dialog>
  303. <el-dialog :visible.sync="dialogVisible" title="选择商品" width="1050px">
  304. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="75px">
  305. <el-form-item label="商品名称" prop="spuName">
  306. <el-input
  307. v-model="queryParams.spuName"
  308. placeholder="请输入商品名称"
  309. clearable
  310. size="small"
  311. @keyup.enter.native="handleQuerys"
  312. />
  313. </el-form-item>
  314. <el-form-item label="商品编号" prop="spuCode">
  315. <el-input
  316. v-model="queryParams.spuCode"
  317. placeholder="请输入商品编号"
  318. clearable
  319. size="small"
  320. @keyup.enter.native="handleQuerys"
  321. />
  322. </el-form-item>
  323. <el-form-item label="SKU编号" prop="skuCode">
  324. <el-input
  325. v-model="queryParams.skuCode"
  326. placeholder="请输入SKU编号"
  327. clearable
  328. size="small"
  329. @keyup.enter.native="handleQuerys"
  330. />
  331. </el-form-item>
  332. <el-form-item>
  333. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuerys">搜索</el-button>
  334. <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys">重置</el-button>
  335. </el-form-item>
  336. <right-toolbar :showSearch.sync="showSearch" @queryTable="getproductList"></right-toolbar>
  337. </el-form>
  338. <el-table border v-loading="loading" :data="productOptions" >
  339. <el-table-column label="序号" width="55" type="index" align="center" />
  340. <el-table-column label="商品编码" align="center" prop="spuCode" />
  341. <el-table-column label="商品图片" align="center" width="160">
  342. <template slot-scope="scope">
  343. <el-popover
  344. placement="right"
  345. title=""
  346. trigger="hover"
  347. >
  348. <img slot="reference" :src="scope.row.image" width="100">
  349. <img :src="scope.row.image" style="max-width: 150px;">
  350. </el-popover>
  351. </template>
  352. </el-table-column>
  353. <el-table-column label="商品名称" align="center" prop="spuName" />
  354. <el-table-column label="SKU编码" align="center" prop="skuCode" />
  355. <el-table-column label="SKU名称" align="center" prop="skuName" />
  356. <el-table-column label="商品分类" align="center" prop="cateName" />
  357. <el-table-column align="cneter">
  358. <template slot-scope="scope" >
  359. <el-button type="primary" @click="selectItem(scope.row)" >添加</el-button>
  360. </template>
  361. </el-table-column>
  362. </el-table>
  363. <span slot="footer" class="dialog-footer">
  364. <el-button @click="dialogVisible = false">取消</el-button>
  365. </span>
  366. </el-dialog>
  367. </div>
  368. </template>
  369. <script>
  370. import { listSupplierProduct, getSupplierProduct, delSupplierProduct, addSupplierProduct, updateSupplierProduct, exportSupplierProduct,listProduct } from "@/api/oms/supplierProduct";
  371. import {listSupplier} from "@/api/oms/supplier";
  372. import singleImg from '@/components/Material/single'
  373. import Material from '@/components/Material'
  374. export default {
  375. name: "SupplierProduct",
  376. components: {
  377. Material,
  378. singleImg,
  379. },
  380. watch: {
  381. imageArr: function(val) {
  382. this.form.image = val.join(',')
  383. }
  384. },
  385. data() {
  386. return {
  387. dialogVisible: false,
  388. // 遮罩层
  389. loading: true,
  390. // 选中数组
  391. ids: [],
  392. // 非单个禁用
  393. single: true,
  394. // 非多个禁用
  395. multiple: true,
  396. // 显示搜索条件
  397. showSearch: true,
  398. // 总条数
  399. total: 0,
  400. // 供应商商品表格数据
  401. supplierProductList: [],
  402. // 弹出层标题
  403. title: "",
  404. // 是否显示弹出层
  405. open: false,
  406. // 是否含包装 0否 1是字典
  407. packagingFlagOptions: [],
  408. // 是否包邮 0否 1是字典
  409. shippingFlagOptions: [],
  410. //供应商
  411. supplierOptions:[],
  412. imageArr:[],
  413. productOptions:[],
  414. // 查询参数
  415. queryParams: {
  416. pageNum: 1,
  417. pageSize: 10,
  418. supplierId: null,
  419. supplierCode: null,
  420. supplierSkucode: null,
  421. supplierSpucode: null,
  422. taxunitPrice: null,
  423. unitPrice: null,
  424. taxRate: null,
  425. packagingFlag: null,
  426. shippingFlag: null,
  427. image: null,
  428. spuCode: null,
  429. skuId: null,
  430. skuCode: null,
  431. skuName: null,
  432. createUserId: null,
  433. updateUserId: null,
  434. },
  435. // 表单参数
  436. form: {},
  437. // 表单校验
  438. rules: {
  439. image: [
  440. { required: true, message: "商品图片不能为空", trigger: "blur" }
  441. ],
  442. name: [
  443. { required: true, message: "供应商不能为空", trigger: "blur" }
  444. ],
  445. }
  446. };
  447. },
  448. created() {
  449. this.getList();
  450. this.getNameSelect();
  451. this.getproductList();
  452. this.getDicts("oms_packaging_flag").then(response => {
  453. this.packagingFlagOptions = response.data;
  454. });
  455. this.getDicts("oms_shipping_flag").then(response => {
  456. this.shippingFlagOptions = response.data;
  457. });
  458. },
  459. methods: {
  460. selectItem(row){
  461. this.form.spuName=row.spuName;
  462. this.form.spuCode=row.spuCode;
  463. this.form.skuName=row.skuName;
  464. this.dialogVisible=false;
  465. },
  466. showDialog() {
  467. this.dialogVisible = true;
  468. },
  469. /** 查询供应商商品列表 */
  470. getList() {
  471. this.loading = true;
  472. listSupplierProduct(this.queryParams).then(response => {
  473. this.supplierProductList = response.rows;
  474. this.total = response.total;
  475. this.loading = false;
  476. });
  477. },
  478. getNameSelect() {
  479. listSupplier(this.queryParams).then(response =>{
  480. this.supplierOptions = response.rows;
  481. });
  482. },
  483. selectSupplier(){
  484. console.log('supplierOptions',this.supplierOptions)
  485. const item = this.supplierOptions.find(item1=> item1.name === this.form.name)
  486. console.log(item)
  487. this.form.supplierId = item.id
  488. this.form.supplierCode = item.code
  489. },
  490. getproductList() {
  491. this.loading = true;
  492. listProduct(this.queryParams).then(response =>{
  493. this.productOptions = response.rows;
  494. this.total = response.total;
  495. this.loading = false;
  496. });
  497. },
  498. // 是否含包装 0否 1是字典翻译
  499. packagingFlagFormat(row, column) {
  500. return this.selectDictLabel(this.packagingFlagOptions, row.packagingFlag);
  501. },
  502. // 是否包邮 0否 1是字典翻译
  503. shippingFlagFormat(row, column) {
  504. return this.selectDictLabel(this.shippingFlagOptions, row.shippingFlag);
  505. },
  506. // 取消按钮
  507. cancel() {
  508. this.open = false;
  509. this.reset();
  510. },
  511. // 表单重置
  512. reset() {
  513. this.form = {
  514. id: null,
  515. name:null,
  516. supplierId: null,
  517. supplierCode: null,
  518. supplierSkucode: null,
  519. supplierSpucode: null,
  520. taxunitPrice: null,
  521. unitPrice: null,
  522. taxRate: null,
  523. packagingFlag: null,
  524. shippingFlag: null,
  525. remark: null,
  526. image: null,
  527. spuName: null,
  528. spuCode: null,
  529. skuId: null,
  530. skuCode: null,
  531. skuName: null,
  532. cateName:null,
  533. createUserId: null,
  534. updateUserId: null,
  535. createTime: null,
  536. updateTime: null
  537. };
  538. this.resetForm("form");
  539. this.imageArr=[];
  540. },
  541. /** 搜索按钮操作 */
  542. handleQuerys() {
  543. this.queryParams.pageNum = 1;
  544. this.getproductList();
  545. },
  546. /** 搜索按钮操作 */
  547. handleQuery() {
  548. this.queryParams.pageNum = 1;
  549. this.getList();
  550. },
  551. /** 重置按钮操作 */
  552. resetQuery() {
  553. this.resetForm("queryForm");
  554. this.handleQuery();
  555. },
  556. resetQuerys(){
  557. this.resetForm("queryForm");
  558. this.handleQuerys;
  559. },
  560. // 多选框选中数据
  561. handleSelectionChange(selection) {
  562. this.ids = selection.map(item => item.id)
  563. this.single = selection.length!==1
  564. this.multiple = !selection.length
  565. },
  566. /** 新增按钮操作 */
  567. handleAdd() {
  568. this.reset();
  569. this.open = true;
  570. this.title = "添加供应商商品";
  571. },
  572. /** 修改按钮操作 */
  573. handleUpdate(row) {
  574. this.reset();
  575. const id = row.id || this.ids
  576. getSupplierProduct(id).then(response => {
  577. this.form = response.data;
  578. this.open = true;
  579. this.title = "修改供应商商品";
  580. });
  581. },
  582. /** 提交按钮 */
  583. submitForm() {
  584. this.$refs["form"].validate(valid => {
  585. if (valid) {
  586. if (this.form.id != null) {
  587. updateSupplierProduct(this.form).then(response => {
  588. if (response.code === 200) {
  589. this.msgSuccess("修改成功");
  590. this.open = false;
  591. this.getList();
  592. }
  593. });
  594. } else {
  595. addSupplierProduct(this.form).then(response => {
  596. if (response.code === 200) {
  597. this.msgSuccess("新增成功");
  598. this.open = false;
  599. this.getList();
  600. }
  601. });
  602. }
  603. }
  604. });
  605. },
  606. /** 删除按钮操作 */
  607. handleDelete(row) {
  608. const ids = row.id || this.ids;
  609. this.$confirm('是否确认删除供应商商品编号为"' + ids + '"的数据项?', "警告", {
  610. confirmButtonText: "确定",
  611. cancelButtonText: "取消",
  612. type: "warning"
  613. }).then(function() {
  614. return delSupplierProduct(ids);
  615. }).then(() => {
  616. this.getList();
  617. this.msgSuccess("删除成功");
  618. }).catch(function() {});
  619. },
  620. /** 导出按钮操作 */
  621. handleExport() {
  622. const queryParams = this.queryParams;
  623. this.$confirm('是否确认导出所有供应商商品数据项?', "警告", {
  624. confirmButtonText: "确定",
  625. cancelButtonText: "取消",
  626. type: "warning"
  627. }).then(function() {
  628. return exportSupplierProduct(queryParams);
  629. }).then(response => {
  630. this.download(response.msg);
  631. }).catch(function() {});
  632. }
  633. }
  634. };
  635. </script>