Bläddra i källkod

设备新增导入

xiongchao 3 år sedan
förälder
incheckning
3549f78184

+ 2 - 2
src/views/purchase/supplier/modules/Detail.vue

@@ -52,7 +52,7 @@
       </detail-list-item>
     </detail-list>
 
-    <title-divider title="审批信息" width="90px" v-if="auditFlag"></title-divider>
+<!--    <title-divider title="审批信息" width="90px" v-if="auditFlag"></title-divider>
     <a-card :bordered="false" title="" v-if="auditFlag">
       <a-steps
         :direction="'horizontal'"
@@ -80,7 +80,7 @@
       :dataSource="auditData"
       :pagination="false"
     >
-    </a-table>
+    </a-table>-->
 
   </a-card>
 </template>

+ 7 - 30
src/views/sb/info/SbInfo.vue

@@ -51,7 +51,11 @@
           <div class="table-operator">
             <a-button v-if="$auth('sb-infos-add')" type="primary" icon="plus" @click="handleAdd">新增</a-button>
             <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="download" @click="doExport">导出</a-button>
-            <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="printQcode()">打印</a-button>
+            <a-button style="margin-left:8px;" type="primary" @click="doImport">
+              <a-icon type="upload"/>
+              新增导入
+            </a-button>
+            <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="print" @click="printQcode()">打印</a-button>
             <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-infos-del')">
               <a-menu slot="overlay">
                 <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
@@ -389,26 +393,7 @@ export default {
         modal.base(res.data)
       })
     },
-    handleAreaChange (value) {
-      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI }).then(res => {
-        this.companyList = res.data
-      })
-    },
-    handleCompanyChange (value) {
-      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.XIANG_MU_BU }).then(res => {
-        this.projectList = res.data
-      })
-    },
-    handleProjectChange (value) {
-      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BU_MEN }).then(res => {
-        this.deptList = res.data
-      })
-    },
-    handleDeptChange (value) {
-      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BAN_ZU }).then(res => {
-        this.groupList = res.data
-      })
-    },
+
     handleCopy (record) {
       this.visible = false
       fetchSbInfo({ id: record.id }).then(res => {
@@ -477,15 +462,7 @@ export default {
       // this.$refs.downloadModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_RECHECKFILE, getDownloadUrl(record.id))
     },
     doImport () {
-      if (this.queryParam.useCompany == null) {
-        this.$message.error('请先选择公司')
-        return
-      }
-      if (this.queryParam.useProject == null) {
-        this.$message.error('请先选择项目部')
-        return
-      }
-      this.$refs.importModal.base(this.queryParam.useCompany, this.queryParam.useProject)
+      this.$refs.importModal.base(null, null)
     },
     doImportDe () {
       this.queryParam.useCompany = null

+ 7 - 12
src/views/sb/info/modules/ImportFormAdd.vue

@@ -18,10 +18,10 @@
       </a-form-item>
     </a-form>
     <p style="color: red">注意事项:<br/>
-      1:请确保设备型号的大小写准确,如ThinkPad,与Thinkpad不是同一型号<br/>
-      2:请确保数据都未导入,重新导入成功不会覆盖原有数据,存在多台同样设备<br/>
+      1:请确保设备新号、名称、型号的准确填写<br/>
+      2:请确保数据都未导入,重新导入成功不会覆盖原有数据,导致存在多台同样设备<br/>
       3:导入如出现问题,请及时联系<br/>
-      4:如果导入折旧,请确保设备财务编码或者编码必须存在一个<br/>
+      4:如果导入折旧,请确保设备新号必须填写<br/>
     </p>
     <template slot="footer">
       <a-button :loading="confirmLoading" type="primary" @click="save()">确定</a-button>
@@ -49,15 +49,10 @@ export default {
   methods: {
     base (useCompany, useProject) {
       this.visible = true
-      if (useCompany == null && useProject == null) {
-        this.modalTitle = '折旧导入'
-        this.type = 2
-      } else {
-        this.useCompany = useCompany
-        this.useProject = useProject
-        this.modalTitle = '设备导入'
-        this.type = 1
-      }
+      this.useCompany = useCompany
+      this.useProject = useProject
+      this.modalTitle = '设备导入'
+      this.type = 1
     },
     handleRemove (file) {
       const index = this.fileList.indexOf(file)