linwenxin 1 yıl önce
ebeveyn
işleme
bb4110581b

+ 1 - 4
src/views/salesPurchasing/mixins/common_code.js

@@ -469,10 +469,7 @@ export default {
                 render: (h, { row, column, index }) => {
                   return (
                     <div style="padding:0 6px" class="operation-btns">
-                      {this.formDialogType == 0
-                        ? null
-                        : this.formDialogType == 1
-                        ? [
+                      {!!~[0,1].indexOf(this.formDialogType) ? [
                             this.isEditIndex == index ? (
                               <el-button
                                 type="text"

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

@@ -65,7 +65,7 @@ export default {
             width: 160
           },
           render: (h, { row, column, index }) => {
-            return this.formDialogType == 0 ? (
+            return !!~[0,1].indexOf(this.formDialogType) ? (
               <div class="redbordererr">
                 <el-form-item
                   label=""

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

@@ -203,7 +203,7 @@ export default {
                           .find(item => item.id == val)
                         row[column.columnAttributes.propName] = data?.goodsName
                         this.getGoodsDetl(data, res => {
-                          if (this.formDialogType == 0) {
+                          if (!!~[0,1].indexOf(this.formDialogType)) {
                             row['specsName'] = res?.specsName
                             row['unit'] = res?.unit
                             row['stockQty'] = res?.stockQty
@@ -311,7 +311,7 @@ export default {
                           )
                           .find(item => item.id == row.goodsMaterialId),
                         res => {
-                          if (this.formDialogType == 0) {
+                          if (!!~[0,1].indexOf(this.formDialogType)) {
                             row['insideQty'] =
                               res.items
                                 .filter(item => item.type === 'INSIDE')

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

@@ -22,7 +22,7 @@ export default {
               <div>
                 {this.activeName == 'goodsInfo'
                   ? [
-                    this.formDialogType == 0 ? (
+                    !!~[0,1].indexOf(this.formDialogType) ? (
                       <div style="margin-bottom:10px">
                         <el-button type="primary" onClick={this.addGoodsInfo}>
                           添加
@@ -46,7 +46,7 @@ export default {
                   ]
                   : this.activeName == 'codeInfo' && this.joinCode
                     ? [
-                      this.formDialogType == 1 ? (
+                      !!~[0,1].indexOf(this.formDialogType) ? (
                         <div style="margin-bottom:10px">
                           <el-button type="primary" onClick={this.addCodeInfo} disabled={this.isEditIndex != -1}>
                             添加