index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. <script>
  2. import useColumns from "./columns";
  3. import {EXIST} from "@/api/business/purchase/catalogue";
  4. import {SAVE} from "@/api/business/purchase/apply";
  5. import {tax, unit, currency} from "@/components/popover-select-v2/fetch";
  6. // 用于回显参照框数据
  7. import {getRefer} from '@/api/purchase/basic.js'
  8. const fetchExist = async (prop) => {
  9. try {
  10. // try
  11. const {code, data} = await EXIST(prop);
  12. if (code === 200) return data;
  13. } catch (err) {
  14. // catch
  15. console.error(err);
  16. } finally {
  17. // finally
  18. }
  19. };
  20. export default {
  21. name: "AddDrawer",
  22. props: {
  23. dict: {
  24. type: Object,
  25. },
  26. },
  27. components: {
  28. ElSuperForm: () => import("@/components/super-form/index.vue"),
  29. ElSuperTable: () => import("@/components/super-table/index.vue"),
  30. ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
  31. ElPopoverSelectV2: () => import("@/components/popover-select-v2/index.vue"),
  32. },
  33. data() {
  34. const {
  35. TabColumns,
  36. TableColumns,
  37. TabColumns: [
  38. {
  39. item: {key: tabName},
  40. },
  41. ],
  42. } = useColumns();
  43. const rules = this.$init.rules([...TabColumns, ...TableColumns]);
  44. const params = this.$init.params([...TabColumns, ...TableColumns]);
  45. return {
  46. title: "新 增",
  47. width: "100%",
  48. visible: false,
  49. loading: false,
  50. rules: rules,
  51. params: params,
  52. tabName: tabName,
  53. TabColumns: TabColumns,
  54. TableColumns: TableColumns,
  55. delDemandItemList: [],
  56. };
  57. },
  58. computed: {},
  59. watch: {},
  60. methods: {
  61. //
  62. async changeMaterialName(prop) {
  63. const {selectData} = prop;
  64. const {
  65. puOrg,
  66. customer,
  67. supplier,
  68. currency,
  69. currencyCode,
  70. currencyName,
  71. } = this.params;
  72. const {nickName: createByName} = this.$store.state.user;
  73. if (selectData.length) {
  74. this.params[this.tabName].splice(-1);
  75. }
  76. for (const item of selectData) {
  77. this.loading = true;
  78. const {tax: taxName, unitName, code: materialCode} = item;
  79. // task 1
  80. const {ntaxrate} = await tax(taxName);
  81. // task 2
  82. const {
  83. id: puUnit,
  84. code: puUnitCode,
  85. name: puUnitName,
  86. } = await unit(unitName);
  87. // task 3
  88. const {
  89. recentlyPrice = "0",
  90. isApprovalFirst = "N",
  91. purchasequantity,
  92. recentlyPriceDate
  93. } = await fetchExist({
  94. puOrg,
  95. customer,
  96. supplier,
  97. materialCode,
  98. customerName: "",
  99. priceType: prop.row.priceType
  100. });
  101. this.loading = false;
  102. await this.onRowAdd(this.tabName, {
  103. ...item,
  104. currency: currency,
  105. currencyCode: currencyCode,
  106. currencyName: currencyName,
  107. unit: puUnit,
  108. unitCode: puUnitCode,
  109. unitName: puUnitName,
  110. puUnit: puUnit,
  111. puUnitCode: puUnitCode,
  112. puUnitName: puUnitName,
  113. recentlyPrice,
  114. isApprovalFirst,
  115. recentlyPriceDate: recentlyPriceDate,
  116. yPurchaseQuantity: purchasequantity,
  117. tax: Number(ntaxrate === "0E-8" ? 0 : ntaxrate),
  118. createByName: createByName,
  119. updateByName: createByName,
  120. id: null,
  121. });
  122. }
  123. },
  124. //
  125. async changeCustomerName(prop) {
  126. console.log("prop", prop)
  127. const {
  128. puOrg,
  129. supplier,
  130. currency,
  131. currencyCode,
  132. currencyName,
  133. } = this.params;
  134. const {
  135. recentlyPrice,
  136. isApprovalFirst,
  137. purchasequantity,
  138. recentlyPriceDate
  139. } = await fetchExist({
  140. puOrg,
  141. supplier,
  142. materialCode: prop.row.materialCode,
  143. customer: prop.row.customerName ? prop.row.customer : '',
  144. customerName: prop.row.customerName,
  145. priceType: prop.row.priceType
  146. });
  147. prop.row.yPurchaseQuantity = purchasequantity
  148. prop.row.recentlyPrice = recentlyPrice
  149. prop.row.isApprovalFirst = isApprovalFirst
  150. prop.row.recentlyPriceDate = recentlyPriceDate
  151. },
  152. //
  153. async onOpen() {
  154. this.visible = true;
  155. const {
  156. deptId: puDept,
  157. deptName: puDeptName,
  158. name: buyer,
  159. nickName: buyerName,
  160. } = this.$store.state.user;
  161. const {id, code, name} = await currency("人民币");
  162. this.params.currency = id;
  163. this.params.currencyCode = code;
  164. this.params.currencyName = name;
  165. this.params.buyer = buyer;
  166. this.params.buyerName = buyerName;
  167. this.params.puDept = puDept;
  168. this.params.puDeptName = puDeptName;
  169. },
  170. //
  171. async onHide() {
  172. const {TabColumns, TableColumns} = useColumns();
  173. this.visible = false;
  174. this.params = this.$init.params([...TabColumns, ...TableColumns]);
  175. this.$emit("success");
  176. this.delDemandItemList = []
  177. },
  178. //
  179. async onRowAdd(prop, pushParams = {}) {
  180. this.$refs.superForm.validate(async (valid) => {
  181. if (valid) {
  182. const {TabColumns} = this;
  183. const {TableColumns} = TabColumns.find(
  184. ({item: {key}}) => key === prop
  185. );
  186. this.params[prop].push({
  187. delFlag: "0",
  188. ...this.$init.params(TableColumns),
  189. ...pushParams,
  190. });
  191. }
  192. });
  193. },
  194. //
  195. async onRowRemove(prop, scope) {
  196. // const {$index} = scope;
  197. // this.params[prop].splice($index, 1);
  198. scope.row.delFlag = '2'
  199. let delList = []
  200. delList = this.params[prop].filter(item => {
  201. return item.delFlag == '2'
  202. })
  203. this.params[prop] = this.params[prop].filter(item => {
  204. return item.delFlag == '0'
  205. })
  206. this.delDemandItemList.push(...delList)
  207. },
  208. //
  209. async useSubmit(prop) {
  210. this.$refs[prop].validate(async (valid) => {
  211. if (valid) {
  212. try {
  213. this.loading = true;
  214. let list = []
  215. list.push(...this.params.priceApplyItems, ...this.delDemandItemList)
  216. this.params.priceApplyItems = this.params.priceApplyItems.filter(
  217. (item) => item.materialName
  218. );
  219. // 深拷贝一下参数对象
  220. let param = JSON.parse(JSON.stringify(this.params))
  221. // console.log('深拷贝对象',param);
  222. param.priceApplyItems = list
  223. param.priceApplyItems.forEach((item, index) => {
  224. item.$index = index
  225. });
  226. let tishi = param.priceApplyItems.filter(item => {return (item.priceDiffer && item.delFlag == '0' && item.priceDiffer !== 0)})
  227. // console.log('筛选', tishi)
  228. let tishiMsg = tishi.map(item => {
  229. return `第${item.$index+1}行为价格调整`
  230. })
  231. // console.log(tishiMsg)
  232. if(tishiMsg.length !== 0) {
  233. this.$modal.confirm(tishiMsg+ '请核对后再次提交').then(async () =>{
  234. const {msg, code} = await SAVE(param);
  235. if (code === 200) {
  236. this.onHide();
  237. this.$emit("success");
  238. this.$notify.success(msg);
  239. this.delDemandItemList = []
  240. }
  241. }).catch(() => {});
  242. } else {
  243. const {msg, code} = await SAVE(param);
  244. if (code === 200) {
  245. this.onHide();
  246. this.$emit("success");
  247. this.$notify.success(msg);
  248. this.delDemandItemList = []
  249. }
  250. }
  251. } catch (err) {
  252. // catch
  253. console.error(err);
  254. } finally {
  255. // finally
  256. this.loading = false;
  257. }
  258. } else {
  259. return false;
  260. }
  261. });
  262. },
  263. // 粘贴
  264. async pasteMe(e, scope, index, prop) {
  265. this.$modal.loading("正在处理数据...");
  266. e.preventDefault() //阻止默认粘贴事件
  267. let source = e.clipboardData.getData("Text");
  268. console.log('scope', scope.column.property)
  269. console.log('index', index)
  270. // 首先对源头进行解析
  271. let rows = source.split("\r\n"); // 拆成一个数组
  272. // 数组去除空字符串
  273. rows = rows.filter(item => {
  274. return item && item.trim()
  275. })
  276. if (rows.length < 100) {
  277. if(scope.column.property == 'materialCode') {
  278. let rowList = []
  279. let newLine = []
  280. await getRefer({ type: 'MATERIAL_PARAM', materialCodeList: rows }).then(res => {
  281. if (res.code === 200) {
  282. rowList = res.rows
  283. }
  284. }).catch(err => {
  285. this.$modal.closeLoading();
  286. })
  287. const {
  288. puOrg,
  289. customer,
  290. customerName,
  291. supplier,
  292. currency,
  293. currencyCode,
  294. currencyName,
  295. } = this.params;
  296. const {TabColumns} = this;
  297. const {TableColumns} = TabColumns.find(
  298. ({item: {key}}) => key === prop
  299. );
  300. // console.log('kk', TableColumns)
  301. // console.log('this.$init.params(TableColumns)', this.$init.params(TableColumns))
  302. for (let i = 0; i<rowList.length; i++) {
  303. let line = {...this.$init.params(TableColumns)}
  304. console.log('line',line)
  305. const {nickName: createByName} = this.$store.state.user;
  306. const {ntaxrate} = await tax(rowList[i].materialRateName);
  307. // task 2
  308. const {
  309. id: puUnit,
  310. code: puUnitCode,
  311. name: puUnitName,
  312. } = await unit(rowList[i].unitIdName);
  313. // task 3
  314. const {
  315. recentlyPrice = "0",
  316. isApprovalFirst = "N",
  317. purchasequantity,
  318. recentlyPriceDate
  319. } = await fetchExist({puOrg, customer, supplier, materialCode: rowList[i].code, customerName: "", priceType: line.priceType});
  320. line.delFlag = '0'
  321. line.materialCode = rowList[i].code
  322. line.material = rowList[i].id
  323. line.materialName = rowList[i].name
  324. line.specification = rowList[i].specification
  325. line.model = rowList[i].model
  326. line.manufacturerName = rowList[i].manufacturerIdName
  327. line.unit = puUnit,
  328. line.unitCode = puUnitCode,
  329. line.unitName = puUnitName,
  330. line.puUnit = puUnit,
  331. line.puUnitCode = puUnitCode,
  332. line.puUnitName = puUnitName,
  333. line.recentlyPrice = recentlyPrice
  334. line.isApprovalFirst = isApprovalFirst
  335. line.recentlyPriceDate = recentlyPriceDate,
  336. line.yPurchaseQuantity = purchasequantity,
  337. line.tax = Number(ntaxrate === "0E-8" ? 0 : ntaxrate),
  338. line.createByName = createByName,
  339. line.updateByName = createByName,
  340. line.currency = currency
  341. line.currencyCode = currencyCode
  342. line.currencyName = currencyName
  343. newLine.push(line)
  344. console.log('临时数组', newLine)
  345. }
  346. // 删除指定下标
  347. this.params[prop].splice(index,this.params[prop].length - index,...newLine)
  348. this.$modal.closeLoading();
  349. this.$modal.notifySuccess("共粘贴" + rowList.length + '条数据');
  350. } else if(scope.column.property == 'taxPrice') {
  351. console.log('复制内容:', rows)
  352. // let newLine = []
  353. // const {TabColumns} = this;
  354. // const {TableColumns} = TabColumns.find(
  355. // ({item: {key}}) => key === prop
  356. // );
  357. if(this.params[prop].length <= 1) {
  358. this.params[prop][index].taxPrice = rows[0]
  359. // for (let i = 0; i<rows.length; i++) {
  360. // let line = {...this.$init.params(TableColumns)}
  361. // line.taxPrice = rows[i]
  362. // newLine.push(line)
  363. // }
  364. // // 删除指定下标
  365. // this.params[prop].splice(index,this.params[prop].length - index,...newLine)
  366. // this.$modal.notifySuccess("共粘贴" + rows.length + '条数据');
  367. this.$modal.closeLoading();
  368. } else {
  369. for(let i = index , j = 0; i < this.params[prop].length; i++, j++) {
  370. this.params[prop][i].taxPrice = rows[j]
  371. }
  372. // this.$refs.table.doLayout()
  373. // console.log(this.params[prop])
  374. this.$modal.closeLoading();
  375. }
  376. } else if(scope.column.property == 'supplierName') {
  377. if(this.params[prop].length <= 1) {
  378. this.params[prop][index].supplierName = rows[0]
  379. this.$modal.closeLoading();
  380. } else {
  381. for(let i = index , j = 0; i < this.params[prop].length; i++, j++) {
  382. this.params[prop][i].supplierName = rows[j]
  383. }
  384. this.$modal.closeLoading();
  385. }
  386. } else if(scope.column.property == 'bidPrice') {
  387. if(this.params[prop].length <= 1) {
  388. this.params[prop][index].bidPrice = rows[0]
  389. this.$modal.closeLoading();
  390. } else {
  391. for(let i = index , j = 0; i < this.params[prop].length; i++, j++) {
  392. this.params[prop][i].bidPrice = rows[j]
  393. }
  394. this.$modal.closeLoading();
  395. }
  396. } else if(scope.column.property == 'unitPrice') {
  397. if(this.params[prop].length <= 1) {
  398. this.params[prop][index].unitPrice = rows[0]
  399. this.$modal.closeLoading();
  400. } else {
  401. for(let i = index , j = 0; i < this.params[prop].length; i++, j++) {
  402. this.params[prop][i].unitPrice = rows[j]
  403. }
  404. this.$modal.closeLoading();
  405. }
  406. } else if(scope.column.property == 'supplierName1') {
  407. if(this.params[prop].length <= 1) {
  408. this.params[prop][index].supplierName1 = rows[0]
  409. this.$modal.closeLoading();
  410. } else {
  411. for(let i = index , j = 0; i < this.params[prop].length; i++, j++) {
  412. this.params[prop][i].supplierName1 = rows[j]
  413. }
  414. this.$modal.closeLoading();
  415. }
  416. } else if(scope.column.property == 'bidPrice1') {
  417. if(this.params[prop].length <= 1) {
  418. this.params[prop][index].bidPrice1 = rows[0]
  419. this.$modal.closeLoading();
  420. } else {
  421. for(let i = index , j = 0; i < this.params[prop].length; i++, j++) {
  422. this.params[prop][i].bidPrice1 = rows[j]
  423. }
  424. this.$modal.closeLoading();
  425. }
  426. } else if(scope.column.property == 'unitPrice1') {
  427. if(this.params[prop].length <= 1) {
  428. this.params[prop][index].unitPrice1 = rows[0]
  429. this.$modal.closeLoading();
  430. } else {
  431. for(let i = index , j = 0; i < this.params[prop].length; i++, j++) {
  432. this.params[prop][i].unitPrice1 = rows[j]
  433. }
  434. this.$modal.closeLoading();
  435. }
  436. } else if(scope.column.property == 'supplierName2') {
  437. if(this.params[prop].length <= 1) {
  438. this.params[prop][index].supplierName2 = rows[0]
  439. this.$modal.closeLoading();
  440. } else {
  441. for(let i = index , j = 0; i < this.params[prop].length; i++, j++) {
  442. this.params[prop][i].supplierName2 = rows[j]
  443. }
  444. this.$modal.closeLoading();
  445. }
  446. } else if(scope.column.property == 'bidPrice2') {
  447. if(this.params[prop].length <= 1) {
  448. this.params[prop][index].bidPrice2 = rows[0]
  449. this.$modal.closeLoading();
  450. } else {
  451. for(let i = index , j = 0; i < this.params[prop].length; i++, j++) {
  452. this.params[prop][i].bidPrice2 = rows[j]
  453. }
  454. this.$modal.closeLoading();
  455. }
  456. } else if(scope.column.property == 'unitPrice2') {
  457. if(this.params[prop].length <= 1) {
  458. this.params[prop][index].unitPrice2 = rows[0]
  459. this.$modal.closeLoading();
  460. } else {
  461. for(let i = index , j = 0; i < this.params[prop].length; i++, j++) {
  462. this.params[prop][i].unitPrice2 = rows[j]
  463. }
  464. this.$modal.closeLoading();
  465. }
  466. }
  467. } else {
  468. this.$modal.notifyWarning("复制长度不能超过100!");
  469. this.$modal.closeLoading();
  470. }
  471. },
  472. },
  473. created() {
  474. },
  475. mounted() {
  476. },
  477. destroyed() {
  478. },
  479. };
  480. </script>
  481. <template>
  482. <el-button v-bind="$attrs" v-on="$listeners" @click="onOpen">
  483. {{ title }}
  484. <el-drawer
  485. :show-close="false"
  486. :size="width"
  487. :title="title"
  488. :visible.sync="visible"
  489. append-to-body
  490. destroy-on-close
  491. @close="onHide"
  492. >
  493. <template slot="title">
  494. <span>{{ title }}</span>
  495. <el-button
  496. type="primary"
  497. :size="$attrs.size"
  498. :loading="loading"
  499. @click="useSubmit('superForm')"
  500. >
  501. 确 认
  502. </el-button>
  503. <el-button :size="$attrs.size" :loading="loading" @click="onHide">
  504. 取 消
  505. </el-button>
  506. </template>
  507. <el-super-form
  508. v-model="params"
  509. :dict="dict"
  510. :rules="rules"
  511. :size="$attrs.size"
  512. :columns="TableColumns"
  513. ref="superForm"
  514. label-width="auto"
  515. label-position="right"
  516. style="padding: 18px"
  517. >
  518. </el-super-form>
  519. <el-tabs v-model="tabName" style="padding: 0 18px 18px">
  520. <el-tab-pane
  521. v-for="({ item, TableColumns: columns }, index) in TabColumns"
  522. :key="index"
  523. :label="item.title"
  524. :name="item.key"
  525. lazy
  526. >
  527. <div v-loading="loading" style="height: 250px; display: flex">
  528. <el-super-ux-table
  529. index
  530. v-model="params[item.key]"
  531. :dict="dict"
  532. :ref="tabName"
  533. height="250"
  534. :columns="columns"
  535. :size="$attrs.size"
  536. >
  537. <template slot="materialName" slot-scope="scope">
  538. <component
  539. v-bind="scope.attr"
  540. v-model="scope.row[scope.item.key]"
  541. :size="$attrs.size"
  542. :source.sync="scope.row"
  543. @change="changeMaterialName({ ...scope, selectData: $event })"
  544. >
  545. </component>
  546. </template>
  547. <template slot="materialCode" slot-scope="scope">
  548. <component
  549. v-bind="scope.attr"
  550. v-model="scope.row[scope.item.key]"
  551. :size="$attrs.size"
  552. :source.sync="scope.row"
  553. @paste.native="pasteMe($event, scope, scope.rowIndex, tabName)"
  554. >
  555. </component>
  556. </template>
  557. <template slot="taxPrice" slot-scope="scope">
  558. <component
  559. v-bind="scope.attr"
  560. v-model="scope.row[scope.item.key]"
  561. :size="$attrs.size"
  562. :source.sync="scope.row"
  563. @paste.native="pasteMe($event, scope, scope.rowIndex, tabName)"
  564. >
  565. </component>
  566. </template>
  567. <template slot="supplierName" slot-scope="scope">
  568. <component
  569. v-bind="scope.attr"
  570. v-model="scope.row[scope.item.key]"
  571. :size="$attrs.size"
  572. :source.sync="scope.row"
  573. @paste.native="pasteMe($event, scope, scope.rowIndex, tabName)"
  574. >
  575. </component>
  576. </template>
  577. <template slot="bidPrice" slot-scope="scope">
  578. <component
  579. v-bind="scope.attr"
  580. v-model="scope.row[scope.item.key]"
  581. :size="$attrs.size"
  582. :source.sync="scope.row"
  583. @paste.native="pasteMe($event, scope, scope.rowIndex, tabName)"
  584. >
  585. </component>
  586. </template>
  587. <template slot="unitPrice" slot-scope="scope">
  588. <component
  589. v-bind="scope.attr"
  590. v-model="scope.row[scope.item.key]"
  591. :size="$attrs.size"
  592. :source.sync="scope.row"
  593. @paste.native="pasteMe($event, scope, scope.rowIndex, tabName)"
  594. >
  595. </component>
  596. </template>
  597. <template slot="supplierName1" slot-scope="scope">
  598. <component
  599. v-bind="scope.attr"
  600. v-model="scope.row[scope.item.key]"
  601. :size="$attrs.size"
  602. :source.sync="scope.row"
  603. @paste.native="pasteMe($event, scope, scope.rowIndex, tabName)"
  604. >
  605. </component>
  606. </template>
  607. <template slot="bidPrice1" slot-scope="scope">
  608. <component
  609. v-bind="scope.attr"
  610. v-model="scope.row[scope.item.key]"
  611. :size="$attrs.size"
  612. :source.sync="scope.row"
  613. @paste.native="pasteMe($event, scope, scope.rowIndex, tabName)"
  614. >
  615. </component>
  616. </template>
  617. <template slot="unitPrice1" slot-scope="scope">
  618. <component
  619. v-bind="scope.attr"
  620. v-model="scope.row[scope.item.key]"
  621. :size="$attrs.size"
  622. :source.sync="scope.row"
  623. @paste.native="pasteMe($event, scope, scope.rowIndex, tabName)"
  624. >
  625. </component>
  626. </template>
  627. <template slot="supplierName2" slot-scope="scope">
  628. <component
  629. v-bind="scope.attr"
  630. v-model="scope.row[scope.item.key]"
  631. :size="$attrs.size"
  632. :source.sync="scope.row"
  633. @paste.native="pasteMe($event, scope, scope.rowIndex, tabName)"
  634. >
  635. </component>
  636. </template>
  637. <template slot="bidPrice2" slot-scope="scope">
  638. <component
  639. v-bind="scope.attr"
  640. v-model="scope.row[scope.item.key]"
  641. :size="$attrs.size"
  642. :source.sync="scope.row"
  643. @paste.native="pasteMe($event, scope, scope.rowIndex, tabName)"
  644. >
  645. </component>
  646. </template>
  647. <template slot="unitPrice2" slot-scope="scope">
  648. <component
  649. v-bind="scope.attr"
  650. v-model="scope.row[scope.item.key]"
  651. :size="$attrs.size"
  652. :source.sync="scope.row"
  653. @paste.native="pasteMe($event, scope, scope.rowIndex, tabName)"
  654. >
  655. </component>
  656. </template>
  657. <template slot="customerName" slot-scope="scope">
  658. <component
  659. v-bind="scope.attr"
  660. v-model="scope.row[scope.item.key]"
  661. :size="$attrs.size"
  662. :source.sync="scope.row"
  663. @input="changeCustomerName({ ...scope, selectData: $event })"
  664. >
  665. </component>
  666. </template>
  667. <ux-table-column fixed="right" label="操作" width="100">
  668. <template slot="header" slot-scope="scope">
  669. <el-button
  670. type="text"
  671. :size="$attrs.size"
  672. @click="onRowAdd(tabName)"
  673. >
  674. 新增
  675. </el-button>
  676. </template>
  677. <template slot-scope="scope">
  678. <el-button
  679. type="text"
  680. :size="$attrs.size"
  681. @click.native.prevent="onRowRemove(tabName, scope)"
  682. >
  683. 删除
  684. </el-button>
  685. </template>
  686. </ux-table-column>
  687. </el-super-ux-table>
  688. </div>
  689. </el-tab-pane>
  690. </el-tabs>
  691. </el-drawer>
  692. </el-button>
  693. </template>
  694. <style scoped></style>