فهرست منبع

内部供应商初始化

黄梓星 1 سال پیش
والد
کامیت
54766e8c7b

+ 53 - 0
src/views/innerData/addOrderInfo.vue

@@ -0,0 +1,53 @@
+<template>
+  <div id="addOrderInfo">
+    <div>
+      <p>新增订单</p>
+      <div class="btn_group">
+        <el-button type="primary" size="mini"  @click="editPage" v-if="sonPageStu == 'check'">编辑</el-button>
+        <el-button type="primary" size="mini"  @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
+        <el-button size="mini" plain @click="back">返回</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ['pageStu','row', 'disable'],
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  data () {
+    return {
+      // 不能直接改变props传来的值
+      sonPageStu: this.pageStu,
+      sonDisable: this.disable,
+    }
+  },
+  methods: {
+    editPage() {
+      this.sonPageStu = 'edit'
+      this.sonDisable = false
+    },
+    async save() {
+    },
+    back() {
+      this.$emit('jugislist', true)
+      this.$emit('refresh')
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.btn_group {
+  // width: 100%;
+  // margin: 20px 0;
+  display: flex;
+  justify-content: space-between;
+  position: absolute;
+  top: 10px;right: 20px;
+
+}  
+</style>

+ 117 - 0
src/views/innerData/addSupplier.vue

@@ -0,0 +1,117 @@
+<template>
+  <div id="addSupplier">
+    <div>
+      <el-card style="position: relative;">
+      <p>新增</p>
+      <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto" :show-message="false">
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="供应商" prop="supplierName">
+              <el-input
+                clearable
+                :disabled="sonDisable"
+                size="mini"
+                v-model="basicForm.supplierName"
+                @clear="clearHang('供应商')"
+              >
+                <el-button
+                  size="mini"
+                  :disabled="sonDisable"
+                  slot="append"
+                  icon="el-icon-more"
+                  @click="
+                    chooseDept(
+                      'SUPPLIER_PARAM',
+                      true,
+                      '选择供应商'
+                    )
+                  "
+                ></el-button>
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <div class="btn_group">
+        <el-button type="primary" size="mini"  @click="editPage" v-if="sonPageStu == 'check'">编辑</el-button>
+        <el-button type="primary" size="mini"  @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
+        <el-button size="mini" plain @click="back">返回</el-button>
+      </div>
+      
+      </el-card>
+    </div>
+
+    
+    <Refers ref="refer" @doSubmit="selectionsToInput" :single="true" />
+  </div>
+</template>
+
+<script>
+export default {
+  components: {
+    Refers: () => import("@/components/Refers/refers.vue"),
+  },
+  props: ['pageStu','row', 'disable'],
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  data () {
+    return {
+      // 不能直接改变props传来的值
+      sonPageStu: this.pageStu,
+      sonDisable: this.disable,
+      basicForm: {
+        supplierName: '',
+        supplierId: '',
+        supplierCode: '',
+      },
+      basicRules: {},
+      referCondition: {
+        type: "",
+        isPage: true,
+        title: "",
+      },
+    }
+  },
+  methods: {
+    editPage() {
+      this.sonPageStu = 'edit'
+      this.sonDisable = false
+    },
+    async save() {
+    },
+    back() {
+      this.$emit('jugislist', true)
+      this.$emit('refresh')
+    },
+    // 明细行选择参照
+    chooseDept(type, isPage, title) {
+      this.referCondition.type = type;
+      this.referCondition.isPage = isPage;
+      this.referCondition.title = title;
+      this.$refs.refer.init(this.referCondition);
+    },
+    selectionsToInput(selection) {
+      if ( this.referCondition.type == "SUPPLIER_PARAM") {
+        this.basicForm.supplierId = selection[0].id;
+        this.basicForm.supplierName = selection[0].name;
+      }
+    },
+    clearHang() {}
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.btn_group {
+  // width: 100%;
+  // margin: 20px 0;
+  display: flex;
+  justify-content: space-between;
+  position: absolute;
+  top: 10px;right: 20px;
+
+}  
+</style>

+ 56 - 0
src/views/innerData/orderInfoIndex.vue

@@ -0,0 +1,56 @@
+<template>
+  <div id="orderInfoIndex">
+    <div v-if="isList">
+      <p>采购订单信息列表</p>
+      <div class="btn_grooup">
+        <el-button type="primary" size="mini" @click="addDivision">新增</el-button>
+        <el-button type="primary" size="mini" @click="delItems">删除</el-button>
+      </div>
+    </div>
+
+    <Add v-model="isList" v-if="!isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="searchList"/>
+  </div>
+</template>
+
+<script>
+export default {
+  components: {
+    Add: () => import("./addOrderInfo.vue"),
+  },
+  data () {
+    return {
+      // 页面配置
+      isList: true,
+      // 页面状态
+      page: '',
+      disable: false,
+      rowDetail: {},
+    }
+  },
+  methods: {
+    // 新增
+    addDivision() {
+      this.isList = false
+      this.page = 'add'
+      this.disable = false
+    },
+    delItems() {},
+    searchList() {
+      // this.useQuery(this.params, this.pageInfo)
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+#orderInfoIndex {
+  padding: 12px;
+  box-sizing: border-box;
+  overflow-y: scroll;
+}
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+</style>

+ 140 - 0
src/views/innerData/supplierIndex.vue

@@ -0,0 +1,140 @@
+<template>
+  <div id="supplierIndex">
+    <div v-if="isList">
+      <el-card v-loading="loading" style="position: relative;">
+      <p>内部供应商档案列表</p>
+      <div class="btn_grooup">
+        <el-button type="primary" size="mini" @click="addDivision">新增</el-button>
+        <el-button type="primary" size="mini" @click="delItems">删除</el-button>
+      </div>
+
+      <el-super-ux-table
+          id="data-table"
+          v-model="tableData"
+          index
+          checkbox
+          :size="size"
+          :dict="dict"
+          :page="pageInfo"
+          :height=500
+          :columns="TableColumns"
+          pagination
+          convenitentOperation
+          storage-key="supplierTable"
+          @row-dblclick="useSee"
+          @row-select="useSelect"
+          @selection-change="handleSelectionChange"
+          @row-click="rowSelect"
+          @pagination="useQuery(params, pageInfo)"
+          ref="tables"
+        >
+          <ux-table-column
+            fixed="right"
+            title="操作"
+            align="center"
+            width="100"
+            >
+            <template slot-scope="scope">
+              <!-- <el-button type="text" size="mini" v-if="scope.row.status == '1' && scope.row.flowId" @click="reback(scope.row)">收回</el-button> -->
+              <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button>
+              <el-button type="text" size="mini" @click="delItem(scope.row)">删除</el-button>
+            </template>
+          </ux-table-column>
+      </el-super-ux-table>
+      
+      </el-card>
+    </div>
+
+    <Add v-model="isList" v-if="!isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="searchList"/>
+  </div>
+</template>
+
+<script>
+export default {
+  dicts: [],
+  components: {
+    Add: () => import("./addSupplier.vue"),
+    ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
+  },
+  data () {
+    return {
+      // 页面配置
+      isList: true,
+      // 页面状态
+      page: '',
+      disable: false,
+      rowDetail: {},
+      size: "mini",
+      loading: false,
+      pageInfo: {
+        pageNum: 1,
+        pageSize: 20,
+        total: 0
+      },
+      tableData: [],
+      selectData: [],
+      // SearchColumns: SearchColumns,
+      TableColumns: [
+        { item: { key: "supplierName", title: "供应商" }, attr: {} },
+        { item: { key: "registrationName", title: "xxx" }, attr: {} },
+        { item: { key: "remark", title: "备注"}, attr: {} },
+      ].map(({ item, attr }) => ({
+      attr,
+      item: {
+        ...item,
+        sortabled: true,
+        fixedabled: true,
+        filterabled: true,
+        hiddenabled: true,
+      },
+      })),
+      ids: []
+    }
+  },
+  methods: {
+    // 新增
+    addDivision() {
+      this.isList = false
+      this.page = 'add'
+      this.disable = false
+    },
+    delItems() {},
+    searchList() {
+      // this.useQuery(this.params, this.pageInfo)
+    },
+    useSee() {},
+    useSelect() {},
+    handleSelectionChange(selection) {
+      console.log('选中', selection)
+      this.ids = selection.map(item => item.id)
+      console.log('选中数组', this.ids)
+    },
+    rowSelect(row) {
+      this.$refs.tables.toggleRowSelection([{row: row}]);
+    },
+    // 加载列表
+    async useQuery(prop, page) {
+      let params = {...prop, ...page}
+      // await getEquipmentDataList(params).then(res => {
+      //   if( res.code === 200 ) {
+      //     this.tableData = res.rows
+      //     this.pageInfo.total = res.total
+      //   }
+      // })
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+#supplierIndex {
+  padding: 12px;
+  box-sizing: border-box;
+  overflow-y: scroll;
+}
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+</style>