15102826049 1 ヶ月 前
コミット
e92e68dc5c

+ 1 - 1
jshERP-web/.env.development

@@ -5,7 +5,7 @@ ENV = 'development'
 NODE_ENV = 'development'
 
 # ERP管理系统/开发环境
-VUE_APP_BASE_API = '/stage-api'
+VUE_APP_BASE_API = ''
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 5 - 1
jshERP-web/src/components/tools/ImportFileModal.vue

@@ -20,7 +20,7 @@
         <a-row class="form-row" :gutter="24">
           <a-col :md="24" :sm="24">
             <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="第一步:">
-              <a target="_blank" :href="templateUrl"
+              <a ref="myLink" @click="importTemplate" :href="templateUrl"
                 ><b>{{ templateName }}</b></a
               >
               <p>提示:模板中的第一行请勿删除</p>
@@ -89,6 +89,10 @@ export default {
       this.templateName = templateName
       this.visible = true
     },
+    importTemplate() {
+      let link = this.$refs.myLink
+      link.setAttribute('download', '供应商模板' + '.xls')
+    },
     close() {
       this.$emit('close')
       this.visible = false

+ 27 - 5
jshERP-web/src/views/stock/TaskList.vue

@@ -15,9 +15,9 @@
           size="middle"
           bordered
           rowKey="id"
-          :columns="taskColumns"
+          :columns="columns"
           :dataSource="dataSource"
-          :components="handleDrag(taskColumns)"
+          :components="handleDrag(columns)"
           :pagination="ipagination"
           :scroll="scroll"
           :loading="loading"
@@ -40,19 +40,41 @@
         </a-table>
       </a-card>
     </a-col>
+    <stock-modal ref="stockModal"></stock-modal>
   </a-row>
 </template>
 
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import FilterForm from './components/FilterForm.vue'
-
+import table from './utils/table'
+import StockModal from './components/stockModal.vue'
 export default {
-  components: { FilterForm },
+  components: { FilterForm, StockModal },
   mixins: [JeecgListMixin],
   data() {
     return {
-      taskColumns: [],
+      description: '盘点任务列表',
+      // 表头
+      scroll: { x: 1500 },
+      // 权限按钮集合
+      btnEnableList: [1, 1, 1],
+      // stockTable: {
+      //   loading: false,
+      //   dataSource: [],
+      //   columns: table.taskColumns,
+      // },
+      defColumns: table.taskColumns,
+      dataSource: [],
+      form: {},
+      organId: { rules: [{ required: true, message: '请选择盘点类型' }] },
+      organId: { rules: [{ required: true, message: '请选择盘点仓库' }] },
+      organId: { rules: [{ required: true, message: '请选择盘点负责人' }] },
+      url: {
+        list: '/api/stock/task/list',
+        delete: '/api/stock/task/delete',
+        exportXlsUrl: 'test/exportXls',
+      },
     }
   },
 }

+ 116 - 0
jshERP-web/src/views/stock/components/editForm.vue

@@ -0,0 +1,116 @@
+<template>
+  <a-form :form="form">
+    <a-row class="form-row" :gutter="24">
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点单号">
+          <a-input placeholder="请输入" v-decorator.trim="['number']" />
+        </a-form-item>
+      </a-col>
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点类型">
+          <a-select
+            placeholder="请选择盘点类型"
+            v-decorator="['organId', validatorRules.organId]"
+            :dropdownMatchSelectWidth="false"
+            showSearch
+            optionFilterProp="children"
+          >
+            <a-select-option v-for="(item, index) in supList" :key="index" :value="item.id">
+              {{ item.supplier }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+      </a-col>
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点任务名称">
+          <a-input placeholder="请输入" v-decorator.trim="['number']" />
+        </a-form-item>
+      </a-col>
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点仓库">
+          <a-select
+            placeholder="请选择盘点仓库"
+            v-decorator="['organId', validatorRules.organId]"
+            :dropdownMatchSelectWidth="false"
+            showSearch
+            optionFilterProp="children"
+          >
+            <a-select-option v-for="(item, index) in supList" :key="index" :value="item.id">
+              {{ item.supplier }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+      </a-col>
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点负责人">
+          <a-select
+            placeholder="请选择盘点负责人"
+            v-decorator="['organId', validatorRules.organId]"
+            :dropdownMatchSelectWidth="false"
+            showSearch
+            optionFilterProp="children"
+          >
+            <a-select-option v-for="(item, index) in supList" :key="index" :value="item.id">
+              {{ item.supplier }}
+            </a-select-option>
+          </a-select>
+        </a-form-item>
+      </a-col>
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="创建人">
+          <a-input placeholder="请输入" v-decorator.trim="['number']" />
+        </a-form-item>
+      </a-col>
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="创建时间">
+          <a-input placeholder="请输入" v-decorator.trim="['number']" />
+        </a-form-item>
+      </a-col>
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点库位范围">
+          <a-input placeholder="请输入" v-decorator.trim="['number']" />
+        </a-form-item>
+      </a-col>
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="商品数量">
+          <a-input placeholder="请输入" v-decorator.trim="['number']" />
+        </a-form-item>
+      </a-col>
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点状态">
+          <a-input placeholder="请输入" v-decorator.trim="['number']" />
+        </a-form-item>
+      </a-col>
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点人">
+          <a-input placeholder="请输入" v-decorator.trim="['number']" />
+        </a-form-item>
+      </a-col>
+      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+        <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="完成时间">
+          <a-input placeholder="请输入" v-decorator.trim="['number']" />
+        </a-form-item>
+      </a-col>
+    </a-row>
+  </a-form>
+</template>
+
+<script>
+export default {
+  name: 'EditForm',
+  props: {
+    form: {
+      type: Object,
+      default: null,
+    },
+    validatorRules: {
+      type: Object,
+      default: () => {
+        return {}
+      },
+    },
+  },
+}
+</script>
+
+<style></style>

+ 106 - 0
jshERP-web/src/views/stock/components/stockModal.vue

@@ -0,0 +1,106 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    :keyboard="false"
+    :forceRender="true"
+    v-bind:prefixNo="prefixNo"
+    fullscreen
+    switchHelp
+    switchFullscreen
+    @cancel="handleCancel"
+    :id="prefixNo"
+    style="top: 20px; height: 95%"
+  >
+    <a-spin :spinning="confirmLoading">
+      <edit-form :form="form" :validatorRules="validatorRules"></edit-form>
+      <div>
+        <a-button type="primary">选择商品</a-button>
+      </div>
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="stockTable.columns"
+        :dataSource="stockTable.dataSource"
+        :components="handleDrag(taskColumns)"
+        :pagination="ipagination"
+        :scroll="scroll"
+        :loading="stockTable.loading"
+        :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+        @change="handleTableChange"
+      >
+        <span slot="action" slot-scope="text, record">
+          <a @click="myHandleDetail(record, '采购入库', prefixNo)">查看</a>
+          <a-divider v-if="btnEnableList.indexOf(1) > -1" type="vertical" />
+          <a v-if="btnEnableList.indexOf(1) > -1" @click="myHandleEdit(record)">编辑</a>
+          <a-divider v-if="btnEnableList.indexOf(1) > -1" type="vertical" />
+          <a-popconfirm
+            v-if="btnEnableList.indexOf(1) > -1"
+            title="确定删除吗?"
+            @confirm="() => myHandleDelete(record)"
+          >
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+        <template slot="customName" slot-scope="text, record">
+          {{ record.name }}
+          <a-tag v-if="record.enableSerialNumber == 1" color="orange">序</a-tag>
+          <a-tag v-if="record.enableBatchNumber == 1" color="orange">批</a-tag>
+        </template>
+      </a-table>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+import editForm from './editForm.vue'
+export default {
+  components: { editForm },
+  props: {
+    form: {
+      type: Object,
+      default: null,
+    },
+    validatorRules: {
+      type: Object,
+      default: () => {
+        return {}
+      },
+    },
+  },
+  data() {
+    return {
+      //   validatorRules: {
+      //     organId: { rules: [{ required: true, message: '请选择盘点类型' }] },
+      //     organId: { rules: [{ required: true, message: '请选择盘点仓库' }] },
+      //     organId: { rules: [{ required: true, message: '请选择盘点负责人' }] },
+      //   },
+      title: '操作',
+      width: '1600px',
+      visible: false,
+      confirmLoading: false,
+      prefixNo: '',
+      //   form: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 8 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      stockTable: {
+        loading: false,
+        dataSource: [],
+        columns: table.goodsColums,
+      },
+    }
+  },
+}
+</script>
+
+<style></style>

+ 82 - 0
jshERP-web/src/views/stock/utils/table.js

@@ -0,0 +1,82 @@
+const table = {
+  taskColumns: [
+    {
+      title: '操作',
+      dataIndex: 'action',
+      scopedSlots: { customRender: 'action' },
+    },
+    {
+      title: '盘点任务编号',
+      dataIndex: 'num',
+    },
+
+    {
+      title: '盘点任务名称',
+      dataIndex: 'name',
+    },
+    {
+      title: '盘点类型',
+      dataIndex: 'type',
+    },
+    {
+      title: '盘点仓库',
+      dataIndex: 'num',
+    },
+    {
+      title: '商品数量',
+      dataIndex: 'time',
+    },
+    {
+      title: '盘点库位范围',
+      dataIndex: 'status',
+    },
+    {
+      title: '创建人',
+      dataIndex: 'person',
+    },
+    {
+      title: '创建时间',
+      dataIndex: 'status',
+    },
+    {
+      title: '盘点负责人',
+      dataIndex: 'person',
+    },
+    {
+      title: '盘点状态',
+      dataIndex: 'remark',
+    },
+    {
+      title: '完成时间',
+      dataIndex: 'remark',
+    },
+  ],
+  goodsColums: [
+    {
+      title: '操作',
+      dataIndex: 'action',
+      align: 'center',
+      width: 60,
+      scopedSlots: { customRender: 'action' },
+    },
+    // { dataIndex: 'mBarCode', title: '条码', scopedSlots: { customRender: 'customBarCode' } },
+    { dataIndex: 'batchNumber', title: '批次号' },
+    { dataIndex: 'name', title: '名称', scopedSlots: { customRender: 'customName' } },
+    { dataIndex: 'categoryName', title: '类别' },
+    { dataIndex: 'standard', title: '规格' },
+    { dataIndex: 'model', title: '型号' },
+    { dataIndex: 'color', title: '颜色' },
+    { dataIndex: 'brand', title: '品牌' },
+    { dataIndex: 'supplierName', title: '供应商' },
+    { dataIndex: 'unit', title: '单位' },
+    { dataIndex: 'sku', title: '多属性' },
+    { dataIndex: 'stock', title: '库存' },
+    { dataIndex: 'productionDate', title: '生产日期' },
+    { dataIndex: 'expiryNum', title: '保质期' },
+    { dataIndex: 'barCode', title: '商品条码' },
+    { dataIndex: 'depotId', title: '仓库名称' },
+    { dataIndex: 'position', title: '仓库货架' },
+  ],
+}
+
+export default table