فهرست منبع

Merge branch '经销商_lin' of https://gogs.zfire.top/zfire-front/zfire-newmall-admin into develop

linwenxin 1 سال پیش
والد
کامیت
83af389243
3فایلهای تغییر یافته به همراه38 افزوده شده و 37 حذف شده
  1. 2 2
      src/utils/request.js
  2. 2 2
      src/views/salesPurchasing/mixins/out_storage_goods.js
  3. 34 33
      src/views/salesPurchasing/mixins/storage_goods.js

+ 2 - 2
src/utils/request.js

@@ -178,8 +178,8 @@ export function getBlob(data) {
  * @param {*} formData
  * @param {*} id
  */
-export async function handleImport(url, formData, id = '') {
-  return await new Promise((resolve, reject) => {
+export function handleImport(url, formData, id = '') {
+  return new Promise((resolve, reject) => {
     axios
       .post(zhapi(process.env.VUE_APP_BASE_API, url), formData, {
         headers: {

+ 2 - 2
src/views/salesPurchasing/mixins/out_storage_goods.js

@@ -1,5 +1,5 @@
 import { required } from '@/components/template/rules_verify.js'
-import { goodsPurchaseRetItemImportCode } from '@/api/merchandisePurchaseReturn.js'
+import { goodsPurchaseRetItemImportCode, goodsPurchaseRetDetail } from '@/api/merchandisePurchaseReturn.js'
 export default {
   data() {
     return {}
@@ -210,7 +210,7 @@ export default {
                           删除
                         </el-button>
                       ) : !!~['SAVE'].indexOf(this.formData.status) ? (
-                        this.importButton(goodsPurchaseRetItemImportCode, '导入条码', { purchaseRetItemId: row.id }, ()=>{}, ()=>{
+                        this.importButton(goodsPurchaseRetItemImportCode, '导入条码', { purchaseRetItemId: row.id }, () => { }, () => {
                           if (this.formData.id) {
                             // 更新表单信息
                             goodsPurchaseRetDetail({ id: this.formData.id }).then(res => {

+ 34 - 33
src/views/salesPurchasing/mixins/storage_goods.js

@@ -2,7 +2,8 @@ import { required } from '@/components/template/rules_verify.js'
 import { getBrandList } from '@/api/miniapp'
 import { getClassifyList } from '@/api/goods'
 import { goodsMaterialList } from '@/api/commercialMaterial.js'
-import { goodsPurchaseItemImportCode } from '@/api/goodsPurchasedStored.js'
+import { goodsPurchaseItemImportCode, goodsPurchaseDetail } from '@/api/goodsPurchasedStored.js'
+
 export default {
   data() {
     return {
@@ -402,44 +403,44 @@ export default {
                     <div style="padding:0 6px" class="operation-btns">
                       {!~['SAVE', 'WAIT', 'OK', 'FAIL'].indexOf(this.formData.status)
                         ? [
-                            this.isEditIndex == index ? (
-                              <el-button
-                                type="text"
-                                onClick={() => {
-                                  this.$refs.formRef.validateField(
-                                    this.getVfyKey(this.isEditIndex),
-                                    (valid, invalidFields, errLabels) => {
-                                      if (valid && this.eidtItems()) {
-                                        this.isEditIndex = -1
-                                      }
+                          this.isEditIndex == index ? (
+                            <el-button
+                              type="text"
+                              onClick={() => {
+                                this.$refs.formRef.validateField(
+                                  this.getVfyKey(this.isEditIndex),
+                                  (valid, invalidFields, errLabels) => {
+                                    if (valid && this.eidtItems()) {
+                                      this.isEditIndex = -1
                                     }
-                                  )
-                                }}
-                              >
-                                保存
-                              </el-button>
-                            ) : null,
-                            this.isEditIndex == -1 ? (
-                              <el-button
-                                type="text"
-                                onClick={() => {
-                                  this.isEditIndex = index
-                                }}
-                              >
-                                编辑
-                              </el-button>
-                            ) : null,
+                                  }
+                                )
+                              }}
+                            >
+                              保存
+                            </el-button>
+                          ) : null,
+                          this.isEditIndex == -1 ? (
                             <el-button
                               type="text"
                               onClick={() => {
-                                this.delGoodsInfo(row, index)
+                                this.isEditIndex = index
                               }}
                             >
-                              删除
+                              编辑
                             </el-button>
-                          ]
+                          ) : null,
+                          <el-button
+                            type="text"
+                            onClick={() => {
+                              this.delGoodsInfo(row, index)
+                            }}
+                          >
+                            删除
+                          </el-button>
+                        ]
                         : !!~['SAVE'].indexOf(this.formData.status)
-                        ? this.importButton(goodsPurchaseItemImportCode, '导入条码', { purchaseItemId: row.id }, ()=>{}, ()=>{
+                          ? this.importButton(goodsPurchaseItemImportCode, '导入条码', { purchaseItemId: row.id }, () => { }, () => {
                             if (this.formData.id) {
                               // 更新表单信息
                               goodsPurchaseDetail({ id: this.formData.id }).then(res => {
@@ -450,7 +451,7 @@ export default {
                               })
                             }
                           })
-                        : null}
+                          : null}
                     </div>
                   )
                 }
@@ -533,7 +534,7 @@ export default {
             if (
               index !== index2 &&
               `${item.brandId}_${item.mainId}_${item.smallId}_${item.goodsMaterialId}` ==
-                `${item2.brandId}_${item2.mainId}_${item2.smallId}_${item2.goodsMaterialId}`
+              `${item2.brandId}_${item2.mainId}_${item2.smallId}_${item2.goodsMaterialId}`
             ) {
               throw new Error('')
             }