|
@@ -20,9 +20,9 @@
|
|
|
<div class="acea-row row-right page">
|
|
|
<Page :total="total" show-elevator show-total @on-change="pageChange" :page-size="formValidate.limit" />
|
|
|
</div>
|
|
|
- <div class="footer" slot="footer" >
|
|
|
+ <!-- <div class="footer" slot="footer" >
|
|
|
<Button type="primary" size="large" :loading="modal_loading" long @click="ok">确定</Button>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -124,11 +124,7 @@
|
|
|
tableList: [],
|
|
|
currentid: 0,
|
|
|
productRow: {},
|
|
|
- columns4: [{
|
|
|
- type: 'selection',
|
|
|
- width: 60,
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
+ columns4: [
|
|
|
{
|
|
|
title: "员工ID",
|
|
|
key: "id",
|
|
@@ -177,70 +173,70 @@
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
- // let radio = {
|
|
|
- // title: "选择",
|
|
|
- // width: 70,
|
|
|
- // align: "center",
|
|
|
- // render: (h, params) => {
|
|
|
- // let id = params.row.id;
|
|
|
- // let flag = false;
|
|
|
- // if (this.currentid === id) {
|
|
|
- // flag = true;
|
|
|
- // } else {
|
|
|
- // flag = false;
|
|
|
- // }
|
|
|
- // let self = this;
|
|
|
- // return h("div", [
|
|
|
- // h("Radio", {
|
|
|
- // props: {
|
|
|
- // value: flag,
|
|
|
- // },
|
|
|
- // on: {
|
|
|
- // "on-change": () => {
|
|
|
- // self.currentid = id;
|
|
|
- // this.productRow = params.row;
|
|
|
- // console.log('zhe+++')
|
|
|
- // this.$emit("getProductId", this.productRow);
|
|
|
- // if (this.productRow.id) {
|
|
|
- // if (this.$route.query.fodder === "image") {
|
|
|
- // /* eslint-disable */
|
|
|
- // let imageObject = {
|
|
|
- // image: this.productRow.image,
|
|
|
- // product_id: this.productRow.id,
|
|
|
- // name: this.productRow.name,
|
|
|
- // };
|
|
|
- // form_create_helper.set("image", imageObject);
|
|
|
- // form_create_helper.close("image");
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // this.$Message.warning("请先选择商品");
|
|
|
- // }
|
|
|
- // },
|
|
|
- // },
|
|
|
- // }),
|
|
|
- // ]);
|
|
|
- // },
|
|
|
- // };
|
|
|
+ let radio = {
|
|
|
+ title: "选择",
|
|
|
+ width: 70,
|
|
|
+ align: "center",
|
|
|
+ render: (h, params) => {
|
|
|
+ let id = params.row.id;
|
|
|
+ let flag = false;
|
|
|
+ if (this.currentid === id) {
|
|
|
+ flag = true;
|
|
|
+ } else {
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
+ let self = this;
|
|
|
+ return h("div", [
|
|
|
+ h("Radio", {
|
|
|
+ props: {
|
|
|
+ value: flag,
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ "on-change": () => {
|
|
|
+ self.currentid = id;
|
|
|
+ this.productRow = params.row;
|
|
|
+ console.log('zhe+++')
|
|
|
+ this.$emit("getProductId", this.productRow);
|
|
|
+ if (this.productRow.id) {
|
|
|
+ if (this.$route.query.fodder === "image") {
|
|
|
+ /* eslint-disable */
|
|
|
+ let imageObject = {
|
|
|
+ image: this.productRow.image,
|
|
|
+ product_id: this.productRow.id,
|
|
|
+ name: this.productRow.name,
|
|
|
+ };
|
|
|
+ form_create_helper.set("image", imageObject);
|
|
|
+ form_create_helper.close("image");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$Message.warning("请先选择商品");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ ]);
|
|
|
+ },
|
|
|
+ };
|
|
|
|
|
|
- // let checkbox = {
|
|
|
- // type: "selection",
|
|
|
- // width: 60,
|
|
|
- // align: "center",
|
|
|
- // };
|
|
|
- // let many = "";
|
|
|
- // if (this.ischeckbox) {
|
|
|
- // many = "many";
|
|
|
- // } else {
|
|
|
- // many = this.$route.query.type;
|
|
|
- // }
|
|
|
- // this.many = many;
|
|
|
- // if (many === "many") {
|
|
|
- // this.columns4.unshift(checkbox);
|
|
|
- // this.columns5.unshift(checkbox);
|
|
|
- // } else {
|
|
|
- // this.columns4.unshift(radio);
|
|
|
- // this.columns5.unshift(radio);
|
|
|
- // }
|
|
|
+ let checkbox = {
|
|
|
+ type: "selection",
|
|
|
+ width: 60,
|
|
|
+ align: "center",
|
|
|
+ };
|
|
|
+ let many = "";
|
|
|
+ if (this.ischeckbox) {
|
|
|
+ many = "many";
|
|
|
+ } else {
|
|
|
+ many = this.$route.query.type;
|
|
|
+ }
|
|
|
+ this.many = many;
|
|
|
+ if (many === "many") {
|
|
|
+ this.columns4.unshift(checkbox);
|
|
|
+ this.columns5.unshift(checkbox);
|
|
|
+ } else {
|
|
|
+ this.columns4.unshift(radio);
|
|
|
+ this.columns5.unshift(radio);
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.goodsCategory();
|