Browse Source

Merge branch 'develop_yh43' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh43

chenrui 11 months ago
parent
commit
e1e9a5acd5

+ 11 - 0
src/store/modules/app.js

@@ -134,6 +134,17 @@ const app = {
           ],
         timeStr: ''
       },
+      // 采购入库
+      {
+        a: 'purchase/queryBySn',
+        b: [
+          'purchase/saveDetail',
+          'purchase/deleteDetail',
+          'purchase/detail/batchInsert',
+          'purchase/setSupplierInfo'
+          ],
+        timeStr: ''
+      },
       // 调拨
      {
         a: 'allocateBill/findBySn',

+ 9 - 5
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -23,15 +23,15 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="业务单号">
-                <a-input id="warehousingConfirmationList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入业务单号"/>
+                <a-input id="warehousingConfirmationList-putBizNo" v-model.trim="queryParam.putBizNo" allowClear placeholder="请输入业务单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="入库类型">
                 <v-select
-                  v-model="queryParam.incomingType"
-                  id="warehousingConfirmationList-incomingType"
-                  code="PUT_CONFIRM_STATE"
+                  v-model="queryParam.putBizType"
+                  id="warehousingConfirmationList-putBizType"
+                  code="PUT_STOCK_TYPE"
                   placeholder="请选择入库类型"
                   allowClear></v-select>
               </a-form-item>
@@ -135,6 +135,8 @@ export default {
       loading: false,
       queryParam: { //  查询条件
         stockPutNo: '', //  入库单号
+        putBizNo: '', //  业务单号
+        putBizType: undefined, //  入库类型
         auditState: undefined, //  状态
         warehouseSn: undefined // 仓库
       },
@@ -169,7 +171,7 @@ export default {
       const arr = [
         { title: '入库时间', dataIndex: 'putTime', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '入库单号', scopedSlots: { customRender: 'stockPutNo' }, width: '12%', align: 'center' },
-        { title: '业务单号', dataIndex: 'stockPutNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'putBizNo', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户名称', dataIndex: 'providerName', align: 'left', width: '18%', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '入库数量', dataIndex: 'productTotalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -197,6 +199,8 @@ export default {
     //  重置
     resetSearchForm () {
       this.queryParam.stockPutNo = ''
+      this.queryParam.putBizNo = ''
+      this.queryParam.putBizType = undefined
       this.queryParam.auditState = undefined
       this.queryParam.warehouseSn = undefined
       this.$refs.table.refresh(true)

+ 47 - 40
src/views/promotionRulesManagement/promotionManagement/addModal.vue

@@ -18,10 +18,11 @@
         :wrapper-col="formItemLayout.wrapperCol"
       >
         <a-form-model-item label="促销名称" prop="name">
-          <a-input v-model="form.name" placeholder="请输入促销名称(最多30个字符)" :maxLength="30"></a-input>
+          <a-input id="promotion-add-name" v-model="form.name" placeholder="请输入促销名称(最多30个字符)" :maxLength="30"></a-input>
         </a-form-model-item>
         <a-form-model-item label="促销时间" prop="time">
           <a-range-picker
+            id="promotion-add-time"
             style="width:100%"
             v-model="form.time"
             :format="dateFormat"
@@ -41,14 +42,14 @@
               </a-select>
             </a-col> -->
             <a-col :md="5" :sm="24">
-              <a-button type="primary" :loading="spinning" @click="handleDealerModal">选择经销商</a-button>
+              <a-button id="promotion-add-chooseDealer" type="primary" :loading="spinning" @click="handleDealerModal">选择经销商</a-button>
             </a-col>
             <a-col :md="6" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
               已{{ chooseDealerList.length }}选项
             </a-col>
             <a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
               <div class="buyerBox">
-                <a-tag closable v-for="con in chooseDealerList" :key="con.buyerSn" @close="delBuyerName(con)">
+                <a-tag closable v-for="con in chooseDealerList" :key="con.buyerSn" :id="'promotion-add-tag-'+con.buyerSn" @close="delBuyerName(con)">
                   {{ con.buyerName }}
                 </a-tag>
               </div>
@@ -58,7 +59,7 @@
         <a-form-model-item style="margin-bottom:10px;" label="促销描述" prop="description" :wrapperCol="{ span: 16 }" :labelCol="{ span: 4 }">
           <a-textarea
             :rows="5"
-            id="promotion-remark"
+            id="promotion-add-remark"
             :maxLength="500"
             v-model="form.description"
             placeholder="请输入备注(最多500个字符)"
@@ -66,8 +67,8 @@
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
-        <a-button id="promotion-modal-back" @click="isShow = false" >取消</a-button>
-        <a-button type="primary" style="margin-left: 15px;" :loading="spinning" id="promotion-modal-save" @click="handleSave">确定</a-button>
+        <a-button id="promotion-add-back" @click="isShow = false" >取消</a-button>
+        <a-button type="primary" style="margin-left: 15px;" :loading="spinning" id="promotion-add-save" @click="handleSave">确定</a-button>
       </div>
     </a-spin>
     <!-- 选择经销商 -->
@@ -89,9 +90,9 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { promoTerminalSave, promoTerminalDetail } from '@/api/promoTerminal'
-import chooseDealer from './chooseDealer'
 import moment from 'moment'
+import chooseDealer from './chooseDealer'
+import { promoTerminalSave, promoTerminalDetail } from '@/api/promoTerminal'
 export default {
   name: 'PromotionAddModal',
   mixins: [commonMixin],
@@ -102,8 +103,7 @@ export default {
       type: Boolean,
       default: false
     },
-    itemId: {
-      //  弹框显示状态
+    itemId: { // 单据id
       type: String,
       default: ''
     }
@@ -111,38 +111,40 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      openDealerModal: false,
+      openDealerModal: false, // 选择经销商弹框
       spinning: false,
       formItemLayout: {
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
       },
       form: {
-        promoActiveSn: undefined,
-        name: '',
-        time: [],
-        activeDateStart: undefined,
-        activeDateEnd: undefined,
-        activeDateEnable: '1',
-        buyerLimitEnable: '1',
-        description: '',
-        promoBuyerList: []
+        promoActiveSn: undefined, // 活动sn
+        name: '', // 活动名称
+        time: [], // 时间
+        activeDateStart: undefined, // 开始时间
+        activeDateEnd: undefined, // 结束时间
+        activeDateEnable: '1', // 活动时间启用
+        buyerLimitEnable: '1', // 部分经销商
+        description: '', // 活动描述
+        promoBuyerList: [] // 参与经销商列表
       },
-      rules: {
+      rules: { // 校验规则
         promoBuyerList: [{ required: true, message: '请选择参与经销商', trigger: 'change' }],
         time: [{ required: true, message: '请选择促销时间', trigger: 'change' }],
         name: [{ required: true, message: '请输入促销名称', trigger: 'blur' }],
         description: [{ required: true, message: '请输入促销描述', trigger: 'blur' }]
       },
-      dateFormat: 'YYYY-MM-DD',
-      isEdit: false,
+      dateFormat: 'YYYY-MM-DD', // 时间格式
+      isEdit: false, // 是否编辑
       chooseDealerList: []// 选择经销商列表
     }
   },
   methods: {
+    // 促销时间不可选范围
     disabledDate (current) {
       return current && current < moment().startOf('day')
     },
+    // 选择经销商
     handleDealerModal () {
       this.openDealerModal = true
       const _this = this
@@ -157,7 +159,7 @@ export default {
         _this.$refs.dealerChoose.pageInit(arr)
       })
     },
-    // 日期  change
+    // 选择活动时间
     dateChange (date, dateStrings) {
       if (dateStrings && dateStrings[0]) {
         this.form.time = dateStrings
@@ -179,7 +181,7 @@ export default {
       // 移除表单必填项
       this.$refs.ruleForm.clearValidate('promoBuyerList')
     },
-    // 获取编辑详情
+    // 获取详情信息
     getEditInfo () {
       promoTerminalDetail({ sn: this.itemId }).then(res => {
         if (res.status == 200) {
@@ -200,7 +202,7 @@ export default {
       const pot = this.chooseDealerList.findIndex(con => { return con.buyerSn == row.buyerSn })
       this.chooseDealerList.splice(pot, 1)
     },
-    //  保存促销
+    // 保存促销
     handleSave () {
       const _this = this
       const newArr = this.chooseDealerList.map(item => {
@@ -227,6 +229,23 @@ export default {
           return false
         }
       })
+    },
+    // 重置表单
+    resetForm () {
+      this.$refs.ruleForm.resetFields()
+      this.form = {
+        promoActiveSn: undefined,
+        name: '',
+        time: [],
+        activeDateStart: undefined,
+        activeDateEnd: undefined,
+        activeDateEnable: '1',
+        buyerLimitEnable: '1',
+        description: '',
+        promoBuyerList: []
+      }
+      this.isEdit = false
+      this.chooseDealerList = []
     }
   },
   watch: {
@@ -238,22 +257,10 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
-        this.$refs.ruleForm.resetFields()
-        this.form = {
-          promoActiveSn: undefined,
-          name: '',
-          time: [],
-          activeDateStart: undefined,
-          activeDateEnd: undefined,
-          activeDateEnable: '1',
-          buyerLimitEnable: '1',
-          description: '',
-          promoBuyerList: []
-        }
-        this.isEdit = false
-        this.chooseDealerList = []
+        this.resetForm()
       } else {
         this.isEdit = !!this.itemId
+        // 编辑
         if (this.itemId) {
           this.getEditInfo()
         }

+ 36 - 28
src/views/promotionRulesManagement/promotionManagement/chooseDealer.vue

@@ -49,7 +49,7 @@
       </a-form>
       <!-- 列表 -->
       <div style="margin-bottom: 10px">
-        <a-button type="primary" ghost :loading="loading" @click="handleBatchAudit">批量添加</a-button>
+        <a-button id="chooseDealer-batchAdd" type="primary" ghost :loading="loading" @click="handleBatchAudit">批量添加</a-button>
         <span style="margin-left: 5px">
           <template v-if="selectCount"> {{ `已选 ${selectCount} 项` }} </template>
         </span>
@@ -77,25 +77,19 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import AreaList from '@/views/common/areaList.js'
-import { dealerQueryList, getDealerListInfo } from '@/api/dealer'
 import subarea from '@/views/common/subarea.js'
 import dealerType from '@/views/common/dealerType.js'
+import { dealerQueryList, getDealerListInfo } from '@/api/dealer'
 export default {
   name: 'ChooseDealer',
   mixins: [commonMixin],
   components: { STable, VSelect, subarea, AreaList, dealerType },
   props: {
-    pageType: {
+    pageType: { // 添加or编辑
       type: String,
       default: ''
     },
-    parentData: {
-      type: Object,
-      default: function () {
-        return null
-      }
-    },
-    itemSn: {
+    itemSn: { // 单据sn
       type: String,
       default: ''
     }
@@ -103,39 +97,41 @@ export default {
   data () {
     return {
       spinning: false,
-      dealerType: [],
+      dealerType: [], // 商户类型默认值
       queryParam: { //  查询条件
-        nameLike: '',
-        dealerType1: undefined, //  商户类型
-        dealerType2: undefined, //  商户类型
-        dealerLevel: null,
+        nameLike: '', // 商户名称
+        dealerType1: undefined, //  商户类型1
+        dealerType2: undefined, //  商户类型2
+        dealerLevel: null, //  商户等级
         subareaArea: {
           subareaSn: undefined, //  区域
           subareaAreaSn: undefined // 分区
         },
-        auditState: undefined,
-        provinceSn: undefined,
-        citySn: undefined,
-        districtSn: undefined
+        auditState: undefined, //  审核状态
+        provinceSn: undefined, // 省
+        citySn: undefined, // 市
+        districtSn: undefined // 区
       },
       pagination: {
-        pageSize: 20,
-        showSizeChanger: true,
-        pageSizeOptions: ['20', '50', '100', '200', '500']
+        pageSize: 20, // 每页数
+        showSizeChanger: true, // 是否显示页码输入框
+        pageSizeOptions: ['20', '50', '100', '200', '500'] // 可选页码
       },
-      pageFlag: false,
-      chooseInfo: [],
-      selectedRowKeys: [],
-      dealerList: [],
-      tableHeight: 0,
+      pageFlag: false, // 经销商加载完成是否
+      chooseInfo: [], // 已选商户
+      selectedRowKeys: [], // 已选商户key
+      dealerList: [], // 商户列表
+      tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
       loading: false // 批量添加loading
     }
   },
   computed: {
+    // 已选商户数量
     selectCount () {
       return this.selectedRowKeys && this.selectedRowKeys.length
     },
+    // 列
     columns () {
       const arr = [
         { title: '经销商名称', dataIndex: 'dealerName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -145,6 +141,7 @@ export default {
         { title: '所在区域', dataIndex: 'subareaArea.subareaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所在分区', dataIndex: 'subareaArea.subareaAreaName', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
+      // 如果时经销商促销活动
       if (this.pageType === 'dealerPromotion') {
         arr.unshift({ title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '30%', align: 'center', ellipsis: true })
       }
@@ -152,9 +149,11 @@ export default {
     }
   },
   methods: {
+    // 全选
     onSelectChange (selectedRowKeys) {
       this.selectedRowKeys = selectedRowKeys
     },
+    // 表格页码变化
     handlePage (pagination, filters, sorter) {
       const pager = { ...this.pagination }
       pager.pageNo = pagination.pageSize != pager.pageSize ? 1 : pagination.current
@@ -163,6 +162,7 @@ export default {
       this.pagination = pager
       this.loadData()
     },
+    // 查询列表
     loadData () {
       this.spinning = true
       const params = { pageSize: 20, pageNo: 1, ...this.pagination }
@@ -182,6 +182,7 @@ export default {
           }
           this.dealerList = data.list
           this.pagination = pagination
+          // 是否已选
           if (this.chooseInfo.length > 0 && !this.pageFlag) {
             this.pageFlag = true
             this.selectedRowKeys = this.chooseInfo
@@ -194,24 +195,28 @@ export default {
     rowSelectionFun (obj) {
       this.rowSelectionInfo = obj || null
     },
+    // 地区选择
     areaChange (val) {
       this.queryParam.provinceSn = val[0] ? val[0] : ''
       this.queryParam.citySn = val[1] ? val[1] : ''
       this.queryParam.districtSn = val[2] ? val[2] : ''
     },
+    // 查询
     searchForm () {
       this.loadData()
       this.spinning = false
     },
+    // 分区选择
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
+    // 商户类型选项
     getDealerType (v, o) {
       this.queryParam.dealerType1 = v[0]
       this.queryParam.dealerType2 = v[1]
     },
-    //  重置
+    //  重置列表
     resetSearchForm () {
       this.dealerType = []
       this.queryParam = {
@@ -253,6 +258,7 @@ export default {
       this.spinning = false
       this.$emit('plAdd', dealerInfoList.data)
     },
+    // 绑定关系
     handleAdd (row) {
       if (row.subareaArea) {
         const _this = this
@@ -270,6 +276,7 @@ export default {
         this.$emit('add', row)
       }
     },
+    // 页面初始化
     pageInit (data) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -279,6 +286,7 @@ export default {
       this.chooseInfo = data || []
       this.resetSearchForm()
     },
+    // 设置表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 285

+ 68 - 78
src/views/promotionRulesManagement/promotionManagement/editModal.vue

@@ -25,22 +25,13 @@
               :maxLength="30"
               v-model.trim="form.title"
               placeholder="请输入标题名称(最多30个字符)"
-              :disabled="isDisabled"
+              v-if="!isDisabled"
               allowClear/>
+            <span v-else>{{ form.title }}</span>
           </a-form-model-item>
           <a-form-model-item label="封面图片" prop="imageSet">
             <Upload
-              v-if="pageType==='add'"
-              class="upload"
-              id="promotionEdit-imageSet"
-              v-model="form.imageSet"
-              ref="imageSet"
-              :fileSize="10"
-              :maxNums="10"
-              @change="changeImage"
-              listType="picture-card"></Upload>
-            <Upload
-              v-else-if="pageType==='edit'&&!isDisabled"
+              v-if="pageType==='add' || (pageType==='edit'&&!isDisabled)"
               class="upload"
               id="promotionEdit-imageSet"
               v-model="form.imageSet"
@@ -62,7 +53,16 @@
             <span class="upload-desc">说明:单张大小小于10Mb,最多10张;建议尺寸:宽(420px)*高(230px)</span>
           </a-form-model-item>
           <a-form-model-item label="排序" prop="sort">
-              <a-input-number style="width:300px;" id="promotionEdit-sort" :disabled="isDisabled" allowClear placeholder="请输入排序数字(数字越大越靠后)" v-model="form.sort" :min="0" :max="999999"/>
+            <a-input-number
+              style="width:300px;"
+              id="promotionEdit-sort"
+              v-if="!isDisabled"
+              allowClear
+              placeholder="请输入排序数字(数字越大越靠后)"
+              v-model="form.sort"
+              :min="0"
+              :max="999999"/>
+            <span v-else>{{ form.sort }}</span>
           </a-form-model-item>
           <a-form-model-item label="内容类型" prop="contentType">
             <v-select
@@ -76,14 +76,7 @@
           </a-form-model-item>
           <a-form-model-item label="内容" prop="content" v-show="form.contentType =='IMAGE_CONTENT'">
             <editor
-              v-if="pageType === 'add'"
-              id="promotionEdit-editor"
-              ref="editor"
-              class="promotionEdit-editor"
-              @on-change="editorChange"
-              :cache="false"></editor>
-            <editor
-              v-if="pageType === 'edit'&&!isDisabled"
+              v-if="pageType === 'add' || (pageType === 'edit'&&!isDisabled)"
               id="promotionEdit-editor"
               ref="editor"
               class="promotionEdit-editor"
@@ -93,7 +86,7 @@
           </a-form-model-item>
           <a-form-model-item label="上传视频" prop="content" v-show="form.contentType =='VIDEO'">
             <Upload
-              v-if="pageType==='add'"
+              v-if="pageType==='add'||(pageType==='edit'&&!isDisabled)"
               class="upload"
               id="promotionEdit-imageSet"
               v-model="form.content"
@@ -102,19 +95,8 @@
               :fileSize="100"
               :maxNums="1"
               @change="changeVideo"
-              ></Upload>
-            <Upload
-              v-else-if="pageType==='edit'&&!isDisabled"
-              class="upload"
-              id="promotionEdit-imageSet"
-              v-model="form.content"
-              fileType="video/mp4"
-              ref="videoSet"
-              :fileSize="100"
-              :maxNums="1"
-              @change="changeVideo"
-              ></Upload>
-            <div v-if="pageType==='edit'&&isDisabled">
+            ></Upload>
+            <div v-else>
               <video width="230" height="150" controls loop controlsList="nodownload">
                 <source :src="form.content" type="video/mp4">
               </video>
@@ -123,15 +105,16 @@
           </a-form-model-item>
           <a-form-model-item label="跳转链接" prop="contentLink" v-if="form.contentType =='LINK'">
             <a-input
-              :disabled="isDisabled"
               id="promotionEdit-title"
+              v-if="!isDisabled"
               :maxLength="100"
               v-model.trim="form.contentLink"
               placeholder="请输入跳转链接"
               allowClear />
+            <span v-else>{{ form.contentLink }}</span>
           </a-form-model-item>
           <a-form-model-item label="是否发布" prop="enabledFlag">
-            <a-radio-group button-style="solid" v-model="form.enabledFlag">
+            <a-radio-group id="promotionEdit-enabledFlag" button-style="solid" v-model="form.enabledFlag">
               <a-radio-button value="1">
               </a-radio-button>
@@ -141,7 +124,7 @@
             </a-radio-group>
           </a-form-model-item>
           <a-form-model-item label="是否显示" prop="showFlag" v-if="form.enabledFlag == 1">
-            <a-radio-group button-style="solid" v-model="form.showFlag">
+            <a-radio-group id="promotionEdit-showFlag" button-style="solid" v-model="form.showFlag">
               <a-radio-button value="1">
                 显示
               </a-radio-button>
@@ -156,9 +139,10 @@
         <a-button id="product-brand-edit-modal-back" @click="isShow = false" style="margin-right:15px;">取消</a-button>
         <a-button
           style="margin-right:15px;color: #fff;background-color: #39f;border-color: #39f;"
+          id="promotionEdit-views"
           @click="handleSee"
           v-if="form.contentType !='LINK'">预览</a-button>
-        <a-button type="primary" id="product-brand-edit-modal-save" @click="handleSave">确定</a-button>
+        <a-button type="primary" id="promotionEdit-save" @click="handleSave">确定</a-button>
       </div>
     </div>
     <!-- 预览 -->
@@ -170,8 +154,9 @@
 import { commonMixin } from '@/utils/mixin'
 import { VSelect, Upload } from '@/components'
 import Editor from '@/components/WEeditor'
-import { saveActive, promoTerminalDetail } from '@/api/promoTerminal'
 import promotionShowModal from './promotionShowModal'
+import { saveActive, promoTerminalDetail } from '@/api/promoTerminal'
+
 export default {
   name: 'ProductBrandEditModal',
   mixins: [commonMixin],
@@ -181,11 +166,11 @@ export default {
       type: Boolean,
       default: false
     },
-    itemId: {
+    itemId: { // 单据id
       type: [Number, String],
       default: ''
     },
-    pageType: {
+    pageType: { // 新增or编辑
       type: String,
       default: 'add'
     }
@@ -204,20 +189,20 @@ export default {
         wrapperCol: { span: 18 }
       },
       form: {
-        promoActiveSn: undefined,
-        title: '',
-        contentType: 'IMAGE_CONTENT',
-        imageSet: '',
-        showFlag: '0',
-        content: '',
-        enabledFlag: '0',
-        sort: undefined,
-        contentLink: ''
+        promoActiveSn: undefined, // 活动sn
+        title: '', // 标题
+        contentType: 'IMAGE_CONTENT', // 内容类型
+        imageSet: '', // 图片
+        showFlag: '0', // 是否显示
+        content: '', // 内容
+        enabledFlag: '0', // 启用禁用
+        sort: undefined, // 排序
+        contentLink: '' // 跳转链接
       },
-      images: [],
-      openShowModal: false,
+      images: [], // 图片
+      openShowModal: false, // 预览弹框
       isDisabled: false, // 控制是否能编辑
-      rules: {
+      rules: { // 规则校验
         title: [
           { required: true, message: '请输入标题名称', trigger: 'blur' }
         ],
@@ -282,7 +267,7 @@ export default {
         }
       })
     },
-    //  确定
+    //  确定发布
     handleSave () {
       const _this = this
       if (_this.form.contentType == 'LINK') {
@@ -324,6 +309,30 @@ export default {
     //  文本编辑器
     editorChange (html, text) {
       this.form.content = html
+    },
+    // 重置表单
+    resetForm () {
+      if (this.pageType == 'add' || (this.pageType == 'edit' && !this.isDisabled)) {
+        this.$refs.imageSet.setFileList('')
+        this.$refs.videoSet.setFileList('')
+      }
+      if (this.$refs.editor) {
+        this.$refs.editor.setHtml('')
+      }
+      this.form = {
+        promoActiveSn: undefined,
+        title: '',
+        contentType: 'IMAGE_CONTENT',
+        imageSet: '',
+        showFlag: '0',
+        content: '',
+        enabledFlag: '0',
+        sort: undefined
+      }
+      this.images = []
+      this.isDisabled = false
+      this.$refs.ruleForm.resetFields()
+      this.$refs.formBox.scrollTop = 0
     }
   },
   watch: {
@@ -335,28 +344,9 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
-        if (this.pageType == 'add' || (this.pageType == 'edit' && !this.isDisabled)) {
-          this.$refs.imageSet.setFileList('')
-          this.$refs.videoSet.setFileList('')
-        }
-        if (this.$refs.editor) {
-          this.$refs.editor.setHtml('')
-        }
-        this.form = {
-          promoActiveSn: undefined,
-          title: '',
-          contentType: 'IMAGE_CONTENT',
-          imageSet: '',
-          showFlag: '0',
-          content: '',
-          enabledFlag: '0',
-          sort: undefined
-        }
-        this.images = []
-        this.isDisabled = false
-        this.$refs.ruleForm.resetFields()
-        this.$refs.formBox.scrollTop = 0
+        this.resetForm()
       } else {
+        // 如果时编辑
         if (this.pageType == 'edit') {
           this.getDetail()
         }
@@ -406,9 +396,9 @@ export default {
       border:1px solid #d9d9d9;
       border-radius:4px;
       padding:4px 11px;
-      color:rgba(0, 0, 0, 0.25);
       cursor: not-allowed;
-      background:#fdfdfd;
+      background:#f8f8f8;
+      padding:10px;
     }
   }
 </style>

+ 37 - 32
src/views/promotionRulesManagement/promotionManagement/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeCreateDate" :value="createDate" @change="dateCreateChange" />
+                <rangeDate id="promotion-creatDate" ref="rangeCreateDate" :value="createDate" @change="dateCreateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -18,6 +18,7 @@
             <a-col :md="4" :sm="24">
               <a-form-item label="显示状态">
                 <a-select
+                  id="promotion-showFlag"
                   v-model="queryParam.showFlag"
                   placeholder="请选择显示状态"
                 >
@@ -39,8 +40,8 @@
             </a-col>
             <a-col :md="4" :sm="24">
               <span class="table-page-search-submitButtons">
-                <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
-                <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a-button id="promotion-search" type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button id="promotion-reset" style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
               </span>
             </a-col>
           </a-row>
@@ -53,7 +54,7 @@
       <a-spin :spinning="spinning" tip="Loading...">
         <!-- 操作按钮 -->
         <div class="table-operator" v-if="$hasPermissions('B_promotionManagementAdd')">
-          <a-button type="primary" @click="openAddModal = true">新增</a-button>
+          <a-button id="promotion-add" type="primary" @click="openAddModal = true">新增</a-button>
         </div>
         <s-table
           class="sTable fixPagination"
@@ -80,7 +81,7 @@
             <a-switch
               checkedChildren="显示"
               unCheckedChildren="隐藏"
-              id="promotion-isEnable"
+              :id="'promotion-isEnable-'+record.id"
               v-model="record.isEnable"
               :disabled="record.state!='PUBLISH'"
               @change="changeFlagHandle(record)" />
@@ -100,14 +101,14 @@
               <template slot="title">
                 <span>{{ record.description }}</span>
               </template>
-              <div @click="promotionDesc(record)" class="link-bule">{{ record.description }}</div>
+              <div :id="'promotion-description-'+record.id" @click="promotionDesc(record)" class="link-bule">{{ record.description }}</div>
             </a-tooltip>
             <div v-else-if="!record.description" class="desc">--</div>
-            <div v-else @click="promotionDesc(record)" class="link-bule">{{ record.description }}</div>
+            <div v-else :id="'promotion-description-'+record.id" @click="promotionDesc(record)" class="link-bule">{{ record.description }}</div>
           </template>
           <!-- 促销展示 -->
           <template slot="salesShow" slot-scope="text, record">
-            <div @click="handleSaleShow(record)" v-if="record.contentType!='LINK'&&record.imageSet && record.imageSet.length>0">
+            <div @click="handleSaleShow(record)" :id="'promotion-imageSet-'+record.id" v-if="record.contentType!='LINK'&&record.imageSet && record.imageSet.length>0">
               <img :src="record.imageSet[0]" alt="图片走丢啦" width="60" />
             </div>
             <div v-else-if="record.contentType=='LINK'&&record.imageSet && record.imageSet.length>0">
@@ -124,28 +125,28 @@
                 class="button-warning"
                 @click="promotionEdit(record)"
                 v-if="(record.state=='UNPUBLISH' || record.state=='CLOSE') && $hasPermissions('B_promotionManagementAdd')"
-                id="promotion-edit-btn">促销编辑</a-button>
+                :id="'promotion-edit-'+record.id" >促销编辑</a-button>
               <a-button
                 size="small"
                 type="link"
                 class="button-warning"
                 @click="handleRelease(record,'edit')"
                 v-if="(record.state=='PUBLISH' || record.state=='CLOSE')&&$hasPermissions('B_promotionManagementContent')"
-                id="promotion-modify-btn">发布修改</a-button>
+                :id="'promotion-pubEdit-'+record.id" >发布修改</a-button>
               <a-button
                 size="small"
                 type="link"
                 class="button-info"
                 @click="handleRelease(record,'add')"
                 v-if="record.state=='UNPUBLISH'&&$hasPermissions('B_promotionManagementContent')"
-                id="promotion-release-btn">促销发布</a-button>
+                :id="'promotion-publish-'+record.id" >促销发布</a-button>
               <a-button
                 size="small"
                 type="link"
                 class="button-error"
                 v-if="record.state=='UNPUBLISH'&&$hasPermissions('B_promotionManagementDel')"
                 @click="handleDel(record)"
-                id="promotion-del-btn">删除</a-button>
+                :id="'promotion-del-'+record.id" >删除</a-button>
               <span v-if="record.state=='End'">--</span>
             </div>
           </template>
@@ -169,12 +170,12 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { promoTerminalList, promoTerminalDel, updateShowFlag } from '@/api/promoTerminal'
 import lookUpCustomersModal from './lookUpCustomersModal'
 import promotionDescModal from './promotionDescModal'
 import promotionShowModal from './promotionShowModal'
 import addModal from './addModal'
 import promotionEditModal from './editModal'
+import { promoTerminalList, promoTerminalDel, updateShowFlag } from '@/api/promoTerminal'
 export default {
   name: 'PromotionList',
   mixins: [commonMixin],
@@ -182,34 +183,34 @@ export default {
     STable,
     VSelect,
     rangeDate,
-    lookUpCustomersModal,
-    promotionShowModal,
-    promotionDescModal,
-    addModal,
-    promotionEditModal
+    lookUpCustomersModal, // 参与客户弹框
+    promotionShowModal, // 促销展示弹框
+    promotionDescModal, // 促销描述弹框
+    addModal, // 新增弹框
+    promotionEditModal // 促销发布弹框
   },
   data () {
     return {
       spinning: false,
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
-      openCustomerModal: false,
-      openDescModal: false,
-      openShowModal: false,
-      openAddModal: false,
-      openPromotionEditModal: false,
+      openCustomerModal: false, // 打开参与客户弹框
+      openDescModal: false, // 促销描述弹框
+      openShowModal: false, // 促销展示弹框
+      openAddModal: false, // 新增弹框
+      openPromotionEditModal: false, // 促销发布弹框
       createDate: [], //  创建时间
-      itemId: '',
+      itemId: '', // 单据id
       descCon: '', // 描述内容
       pageType: '', // 发布类型  add  促销发布  edit 发布修改
-      dealerSn: [],
+      dealerSn: [], // 客户sn
       // 查询参数
       queryParam: {
-        beginDate: undefined,
-        endDate: undefined,
-        name: '',
-        showFlag: undefined,
-        state: undefined
+        beginDate: undefined, // 开始时间
+        endDate: undefined, // 结束时间
+        name: '', // 促销名称
+        showFlag: undefined, // 显示状态
+        state: undefined // 状态
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -231,6 +232,7 @@ export default {
           return data
         })
       },
+      // 列定义
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -257,7 +259,7 @@ export default {
         this.$refs.lookUpCustomers.pageInit({ dealerSnList: row.promoBuyerSnSet ? row.promoBuyerSnSet : undefined, promoActiveSn: row.promoActiveSn })
       })
     },
-    //  创建时间  change
+    //  选择创建时间  change
     dateCreateChange (date) {
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
@@ -322,6 +324,7 @@ export default {
         }
       })
     },
+    // 重置列表
     resetSearchForm () {
       this.$refs.rangeCreateDate.resetDate(this.createDate)
       this.queryParam.beginDate = undefined
@@ -344,12 +347,14 @@ export default {
       this.openPromotionEditModal = false
       this.itemId = ''
     },
+    // 页面初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 设置表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 240

+ 30 - 34
src/views/promotionRulesManagement/promotionManagement/lookUpCustomersModal.vue

@@ -16,23 +16,24 @@
             <a-row :gutter="15">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="地区">
-                  <AreaList id="actualSalesReportList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
+                  <AreaList id="cykh-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="区域/分区">
-                  <subarea ref="subarea" id="salesManagementList-subarea" @change="subareaChange"></subarea>
+                  <subarea ref="subarea" id="cykh-subarea" @change="subareaChange"></subarea>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="经销商名称">
-                  <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
+                  <a-input id="cykh-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入经销商名称"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckMakeInventoryList-refresh">查询</a-button>
-                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckMakeInventoryList-reset">重置</a-button>
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="cykh-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="cykh-reset">重置</a-button>
                 <a-button
+                  id="cykh-export"
                   style="margin-left: 10px"
                   type="primary"
                   class="button-warning"
@@ -72,15 +73,16 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable } from '@/components'
-import ProductType from '@/views/common/productType.js'
+import { hdExportExcel } from '@/libs/exportExcel'
+// 组件
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
-import { hdExportExcel } from '@/libs/exportExcel'
+// 接口
 import { dealerExport } from '@/api/promoTerminal'
 import { dealerQueryList } from '@/api/dealer'
 export default {
   name: 'LookUpCustomersModal',
-  components: { STable, ProductType, subarea, AreaList },
+  components: { STable, subarea, AreaList },
   mixins: [commonMixin],
   props: {
     openModal: { //  弹框显示状态
@@ -91,20 +93,19 @@ export default {
   data () {
     return {
       spinning: false,
-      isShow: this.openModal, //  是否打开弹框
       disabled: false,
-      advanced: false,
-      exportShow: false,
-      exportLoading: false,
+      isShow: this.openModal, //  是否打开弹框
+      exportLoading: false, // 导出按钮loading
+      // 查询参数
       queryParam: {
-        subareaArea: {
+        subareaArea: { // 区域分区
           subareaSn: undefined,
           subareaAreaSn: undefined
         },
-        provinceSn: undefined,
-        citySn: undefined,
-        districtSn: undefined,
-        dealerName: undefined
+        provinceSn: undefined, // 省
+        citySn: undefined, // 市
+        districtSn: undefined, // 区
+        dealerName: undefined // 经销商名称
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -125,16 +126,8 @@ export default {
           return data
         })
       },
-      basicInfoData: null, //  基本信息
-      productTotal: null,
-      productType: [],
-      snObj: undefined, // 经销商列表
-      warehouseList: [], //  仓库  下拉数据
-      localDataSource: [],
-      isPrice: false, //  仅显示盈亏
-      openPrintModal: false,
-      nowType: null,
-      printerType: 'NEEDLE', //  打印机类型
+      snObj: undefined, // 经销商sn列表
+      // 列定义
       columns: [
         { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
         { title: '地区', scopedSlots: { customRender: 'address' }, width: '20%', align: 'center', ellipsis: true },
@@ -147,21 +140,18 @@ export default {
     }
   },
   methods: {
+    // 地区
     areaChange (val) {
       this.queryParam.provinceSn = val[0] ? val[0] : ''
       this.queryParam.citySn = val[1] ? val[1] : ''
       this.queryParam.districtSn = val[2] ? val[2] : ''
     },
+    // 区域/分区
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
     },
-    pageInit (data) {
-      this.snObj = data
-      this.queryParam = Object.assign(this.queryParam, data)
-      this.$refs.table.refresh(true)
-    },
-    //  重置
+    //  重置列表
     resetSearchForm () {
       this.queryParam = Object.assign({
         provinceSn: undefined,
@@ -177,7 +167,7 @@ export default {
       this.$refs.subarea.clearData()
       this.$refs.table.refresh(true)
     },
-    //  导出
+    //  促销经销商列表导出
     handleExport () {
       const _this = this
       _this.exportLoading = true
@@ -187,6 +177,12 @@ export default {
         _this.spinning = false
         _this.showExport = true
       })
+    },
+    // 页面初始
+    pageInit (data) {
+      this.snObj = data
+      this.queryParam = Object.assign(this.queryParam, data)
+      this.$refs.table.refresh(true)
     }
   },
   watch: {

+ 1 - 1
src/views/promotionRulesManagement/promotionManagement/promotionDescModal.vue

@@ -27,7 +27,7 @@ export default {
       type: Boolean,
       default: false
     },
-    con: {
+    con: { // 促销描述
       type: String,
       default: ''
     }

+ 2 - 2
src/views/promotionRulesManagement/promotionManagement/promotionShowModal.vue

@@ -37,10 +37,10 @@ export default {
   },
   data () {
     return {
-      modalTit: '促销展示',
+      modalTit: '促销展示', // 标题
       isShow: this.openModal, //  是否打开弹框
       mainContent: '', // 主要显示内容
-      showType: undefined//
+      showType: undefined // 显示类型,图片、视频
     }
   },
   methods: {

+ 9 - 2
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -117,9 +117,10 @@ export default {
       showEmpty: false, // 是否显示空数据图片
       showTableHead: true, // 是否显示表格头部
       colspanNums: 13, // 单元格合并列数
-      hasOutStockOfActive: false,
+      hasOutStockOfActive: false, // 产品是否存在缺货
       simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, // 空图片
-      showStockCol: false
+      showStockCol: false, // 显示第三方库存
+      hasJGtire: false // 是否轮胎产品
     }
   },
   computed: {
@@ -403,6 +404,8 @@ export default {
         const productName = (item.productEntity && item.productEntity.name) || (item.dealerProductEntity && item.dealerProductEntity.name)
         const productOrigCode = (item.productEntity && item.productEntity.origCode) || (item.dealerProductEntity && item.dealerProductEntity.origCode)
         const productOrigUnit = (item.productEntity && item.productEntity.unit) || (item.dealerProductEntity && item.dealerProductEntity.unit)
+        const productBrand = (item.productEntity && item.productEntity.productBrandName) || (item.dealerProductEntity && item.dealerProductEntity.productBrandName)
+        const productType3 = (item.productEntity && item.productEntity.productTypeName3) || (item.dealerProductEntity && item.dealerProductEntity.productTypeName3)
         item.productCode = productCode || '--'
         item.productName = productName || '--'
         item.productOrigCode = productOrigCode == ' ' ? '--' : productOrigCode
@@ -415,6 +418,10 @@ export default {
             this.hasOutStockOfActive = true
           }
         }
+        // 判断是否有箭冠轮胎产品
+        if (productBrand.indexOf('箭冠') >= 0 && productType3.indexOf('轮胎') >= 0) {
+          this.hasJGtire = true
+        }
       })
       // 是否有缺货明细
       if (str.length > 0) {

+ 7 - 7
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -3,33 +3,33 @@
     <!-- 筛选条件 -->
     <div class="table-page-search-wrapper" style="margin:0">
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="4" :sm="24">
+        <a-row :gutter="15" type="flex">
+          <a-col flex="1">
             <a-form-item label="出库仓库" prop="warehouseSn">
               <chooseWarehouse id="salesEdit-warehouseSn" ref="warehouse" v-model="queryParam.warehouseSn" @load="warehouseLoad"></chooseWarehouse>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col flex="1">
             <a-form-item label="产品编码" prop="productCode">
               <a-input id="salesEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col flex="2">
             <a-form-item label="产品名称" prop="productName">
               <a-input id="salesEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col flex="1">
             <a-form-item label="品牌">
               <ProductBrand id="salesEdit-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col flex="1">
             <a-form-item label="产品分类">
               <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="salesEdit-productType"></productTypeAll>
             </a-form-item>
           </a-col>
-          <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+          <a-col flex="2" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
             <a-button

+ 9 - 0
src/views/salesManagement/salesQueryNew/detail.vue

@@ -392,6 +392,15 @@ export default {
           return
         }
 
+        if (this.$refs.productList.hasJGtire) {
+          this.$info({
+            title: '提示',
+            content: '存在箭冠轮胎产品,不可一键审核!',
+            centered: true
+          })
+          return
+        }
+
         this.showDsModal = true
         this.$refs.dsModal.setDetail(this.detailData)
       } else {

+ 39 - 11
src/views/salesManagement/waitDispatchNew/queryPart.vue

@@ -410,7 +410,7 @@ export default {
         { title: '', field: '', key: 'acheck', width: 50, type: 'checkbox', align: 'center' },
         { title: '序号', field: 'no', key: 'a', width: 50, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return noFormat(row, row[column.field], h) } },
         { title: '产品编码', field: 'productCode', key: 'b', width: 150, align: 'left', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return codeFormat(row, row[column.field], h) } },
-        { title: '产品名称', field: 'productName', key: 'c', width: 250, align: 'left', operationColumn: false, ellipsis: { showTitle: true }, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
+        { title: '产品名称', field: 'productName', key: 'c', width: 220, align: 'left', operationColumn: false, ellipsis: { showTitle: true }, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
         { title: '原厂编码', field: 'productOrigCode', key: 'd', width: 150, align: 'left', operationColumn: false, ellipsis: { showTitle: true }, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
         { title: '出库仓库', field: 'warehouseName', key: 'e', width: 100, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } }
       ]
@@ -429,6 +429,7 @@ export default {
         { title: '可用库存', field: 'stockQty', width: 80, key: 'j', align: 'center', fixed: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } }
       ])
       if (this.showLockStockQty) {
+        this.colspanNums = this.colspanNums + 1
         arr.push({ title: '锁定库存', field: 'lockStockQty', width: 80, key: 'jk', align: 'center', fixed: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
       }
       arr = arr.concat([
@@ -659,10 +660,18 @@ export default {
     },
     // 添加
     handleAdd (row) {
-      if (row.stockQty > 0) { //  可用库存大于0才可添加
-        this.$emit('addProduct', [row.salesBillDetailSn])
+      if (row && row.productEntity && row.productEntity.productBrandName == '箭冠' && row.productEntity.productTypeName3 == '轮胎') {
+        if (!row.lockStockQty) {
+          this.$message.warning('锁定库存不足!')
+        } else {
+          this.$emit('addProduct', [row.salesBillDetailSn])
+        }
       } else {
-        this.$message.warning('库存为0,不可添加!')
+        if (row.stockQty > 0) { //  可用库存大于0才可添加
+          this.$emit('addProduct', [row.salesBillDetailSn])
+        } else {
+          this.$message.warning('库存为0,不可添加!')
+        }
       }
     },
     // 批量转采购额
@@ -711,22 +720,41 @@ export default {
         _this.$message.warning('请先选择产品!')
         return
       }
-      const chooseRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.stockQty > 0)
+
+      // 库存为0的产品
       const noStockRow = this.dataSource.filter(item => chooseList.includes(item.id) && !item.stockQty)
-      console.log(noStockRow)
-      const obj = []
+      // 冻结库存为0的产品
+      const noLockStockRow = this.dataSource.filter(item => chooseList.includes(item.id) && item.productEntity && item.productEntity.productBrandName == '箭冠' && item.productEntity.productTypeName3 == '轮胎' && !item.lockStockQty)
+
+      // 库存为0产品编码列表
       const noObj = []
-      chooseRow && chooseRow.map(item => {
-        obj.push(item.salesBillDetailSn)
-      })
+      const noObjSn = []
       noStockRow && noStockRow.map(item => {
         noObj.push(item.productCode)
+        noObjSn.push(item.salesBillDetailSn)
+      })
+      // 冻结库存为0的产品
+      const noLockObj = []
+      const noLockObjSn = []
+      noLockStockRow && noLockStockRow.map(item => {
+        noLockObj.push(item.productCode)
+        noLockObjSn.push(item.salesBillDetailSn)
+      })
+
+      // 可添加产品
+      const chooseRow = this.dataSource.filter(item => {
+        return chooseList.includes(item.id) && !noObjSn.includes(item.salesBillDetailSn) && !noLockObjSn.includes(item.salesBillDetailSn)
+      })
+      // 可添加产品sn列表
+      const obj = []
+      chooseRow && chooseRow.map(item => {
+        obj.push(item.salesBillDetailSn)
       })
 
       if (obj.length) {
         this.$confirm({
           title: '提示',
-          content: <div><div style="text-align:center;padding:10px 0;font-weight:bold;">确认要批量添加到待下推列表吗?</div>{noObj.length ? <div><div>总共选择了 {chooseList.length} 个产品,其中 {obj.length} 个产品可添加。</div><div> 产品 ({noObj.toString()}) 因库存为0不可添加!</div></div> : ''}</div>,
+          content: <div><div style="text-align:center;padding:10px 0;font-weight:bold;">确认要批量添加到待下推列表吗?</div>{(noObj.length || noLockObj.length) ? <div><div>总共选择了 {chooseList.length} 个产品,其中 {obj.length} 个产品可添加。</div>{noObj.length ? <div>产品 ({noObj.toString()}) 因库存为0不可添加!</div> : ''}</div> : ''}<div>{noLockObj.length ? <div>产品 ({noLockObj.toString()}) 因锁定库存为0不可添加!</div> : ''}</div></div>,
           centered: true,
           closable: true,
           class: 'confirm-center',