yusheng před 1 rokem
rodič
revize
cb77f24fbc

+ 5 - 4
src/BIZComponents/product-list.vue

@@ -1,6 +1,6 @@
 <template>
   <ele-modal
-    title="选择品"
+    title="选择品"
     :visible.sync="visible"
     v-if="visible"
     :before-close="handleClose"
@@ -104,6 +104,7 @@
             :isFirstRefreshTable="isFirstRefreshTable"
             ref="treeList"
             :ids="ids"
+            :typeIds="typeIds"
           />
         </div>
         <!-- 表格 -->
@@ -228,7 +229,7 @@ export default {
       cBomListDialogFlag: null,
       dictList: {},
       selection: [],
-      ids: [],
+      isColorId: [],
       dataSources: '1', // 0:仓库;1:主数据
       dimension: '1',
       searchForm: {
@@ -439,12 +440,12 @@ export default {
     },
     async tableDone() {
       if (this.isSalesRecord == 1 || this.isSalesRecord == 2) {
-        this.ids = await queryLastContractProductList(this.isSalesRecord);
+        this.isColorId = await queryLastContractProductList(this.isSalesRecord);
       }
     },
     //上次销售记录 改变背景色
     tableRowClassName({ row }) {
-      if (this.ids?.includes(row?.id)) {
+      if (this.isColorId?.includes(row?.id)) {
         return 'success-row';
       }
       return '';

+ 1 - 1
src/views/home/data.js

@@ -38,7 +38,7 @@ export const columns = [
     align: 'center',
     showOverflowTooltip: true,
     formatter: (_row, _column, cellValue) => {
-      return cellValue==1?'生产性订单':cellValue==2?'无客户生产性订单':cellValue==4?'不定向订单':'库存式订单'
+      return cellValue==1?'有客户生产性订单':cellValue==2?'无客户生产性订单':cellValue==4?'不定向订单':'库存式订单'
     }
   },
   {

+ 130 - 122
src/views/saleManage/contact/components/darwerComponents/addFollowDialog.vue

@@ -74,7 +74,7 @@
           ></el-input>
         </el-form-item>
         <el-form-item prop="files" label="附件">
-          <fileMain v-model="form.fileId"></fileMain>
+          <fileMain v-model="form.files"></fileMain>
         </el-form-item>
       </el-form>
 
@@ -86,140 +86,148 @@
   </div>
 </template>
 <script>
-import dictMixins from '@/mixins/dictMixins';
-import { copyObj } from '@/utils/util';
+  import dictMixins from '@/mixins/dictMixins';
+  import { copyObj } from '@/utils/util';
 
-import fileMain from '@/components/addDoc/index';
+  import fileMain from '@/components/addDoc/index';
 
-export default {
-  mixins: [dictMixins],
-  components: {
-    fileMain
-  },
-  data() {
-    let formDef = {
-      agreement: '',
-      contactId: '',
-      content: '',
-      followupTime: '',
-      linkId: '',
-      linkName: '',
-      nextPlan: '',
-      opportunityId: '',
-      stageCode: '',
-      fileId: [],
-      stageName: ''
-    };
+  export default {
+    mixins: [dictMixins],
+    components: {
+      fileMain
+    },
+    data() {
+      let formDef = {
+        agreement: '',
+        contactId: '',
+        content: '',
+        followupTime: '',
+        linkId: '',
+        linkName: '',
+        nextPlan: '',
+        opportunityId: '',
+        stageCode: '',
+        files: [],
+        stageName: ''
+      };
 
-    return {
-      dialogVisible: false,
-      currentDetail: {}, //选择的客户信息
-      linkNameOptions: [],
-      title: '',
-      row: {},
-      activeName: 'base',
-      formDef,
-      form: copyObj(formDef),
-      rules: {
-        content: [
-          { required: true, message: '请输入跟进内容', trigger: 'blur' }
-        ],
-        followupTime: [
-          { required: true, message: '请选择跟进时间', trigger: 'change' }
-        ],
-        stageCode: [
-          { required: true, message: '请选择跟进阶段', trigger: 'change' }
-        ],
-        
-        linkName: [
-          {
-            required: true,
-            message: '请选择客户联系人名称',
-            trigger: 'change'
-          }
-        ]
-      },
+      return {
+        dialogVisible: false,
+        currentDetail: {}, //选择的客户信息
+        linkNameOptions: [],
+        title: '',
+        row: {},
+        activeName: 'base',
+        formDef,
+        form: copyObj(formDef),
+        rules: {
+          content: [
+            { required: true, message: '请输入跟进内容', trigger: 'blur' }
+          ],
+          followupTime: [
+            { required: true, message: '请选择跟进时间', trigger: 'change' }
+          ],
+          stageCode: [
+            { required: true, message: '请选择跟进阶段', trigger: 'change' }
+          ],
 
-      // 提交状态
-      loading: false,
-      // 是否是修改
-      isUpdate: false,
-      index:'',
-      type:''
-    };
-  },
-  created() {},
-  methods: {
-    //更改弹框状态
-    async open(type, row, linkNameOptions,index) {
-      this.linkNameOptions = linkNameOptions;
-      this.title = type === 'add' ? '新增' : '修改';
-      this.index=index
-      this.type=type
-      this.row = copyObj(row);
-      this.dialogVisible = true;
-      if (type != 'add') {
-        this.form = this.row;
-      }
-    },
+          linkName: [
+            {
+              required: true,
+              message: '请选择客户联系人名称',
+              trigger: 'change'
+            }
+          ]
+        },
 
-    //表单验证
-    getValidate() {
-      return new Promise((resolve, reject) => {
-        this.$refs.form.validate((valid) => {
-          if (!valid) {
-            reject(false);
-          } else {
-            resolve(true);
+        // 提交状态
+        loading: false,
+        // 是否是修改
+        isUpdate: false,
+        index: '',
+        type: ''
+      };
+    },
+    created() {},
+    methods: {
+      //更改弹框状态
+      async open(type, row, linkNameOptions, index) {
+        this.linkNameOptions = linkNameOptions;
+        this.title = type === 'add' ? '新增' : '修改';
+        this.index = index;
+        this.type = type;
+        this.row = copyObj(row);
+        this.dialogVisible = true;
+        if (type != 'add') {
+          this.form = this.row;
+          if (row.linkId) {
+            this.$set(this.form, 'linkId', row.linkId.split(','));
           }
+      
+        }
+      },
+
+      //表单验证
+      getValidate() {
+        return new Promise((resolve, reject) => {
+          this.$refs.form.validate((valid) => {
+            if (!valid) {
+              reject(false);
+            } else {
+              resolve(true);
+            }
+          });
         });
-      });
-    },
+      },
 
-    //选择下拉框
-    onchangeLink(selectedOptions) {
-      const selectedLabels = selectedOptions
-        .map((optionId) => {
-          const option = this.linkNameOptions.find(
-            (opt) => opt.id === optionId
-          );
-          return option ? option.linkName : '';
-        })
-        .join(',');
-      this.form.linkName = selectedLabels;
-    },
+      //选择下拉框
+      onchangeLink(selectedOptions) {
+        const selectedLabels = selectedOptions
+          .map((optionId) => {
+            const option = this.linkNameOptions.find(
+              (opt) => opt.id === optionId
+            );
+            return option ? option.linkName : '';
+          })
+          .join(',');
+        this.form.linkName = selectedLabels;
+      },
 
-    //保存
-    async sumbit() {
-      try {
-        await this.getValidate();
-        this.form.stageName = this.getDictValue(
-          '商机阶段',
-          this.form.stageCode
-        );
-        this.$emit('done',{ data:JSON.parse(JSON.stringify(this.form)),type:this.type,index:this.index});
+      //保存
+      async sumbit() {
+        try {
+          await this.getValidate();
+          this.form.stageName = this.getDictValue(
+            '商机阶段',
+            this.form.stageCode
+          );
+          this.$emit('done', {
+            data: JSON.parse(JSON.stringify(this.form)),
+            type: this.type,
+            index: this.index
+          });
+          this.cancel();
+        } catch (error) {
+          console.log(error);
+          // 表单验证未通过,不执行保存操作
+        }
+      },
+      cancel() {
+        this.$nextTick(() => {
+          // 关闭后,销毁所有的表单数据
+          this.$refs['form'] && this.$refs['form'].resetFields();
+          (this.form = copyObj(this.formDef)), (this.dialogVisible = false);
+        });
+      },
+      handleClose() {
         this.cancel();
-      } catch (error) {
-        console.log(error);
-        // 表单验证未通过,不执行保存操作
       }
-    },
-    cancel() {
-      this.$nextTick(() => {
-        // 关闭后,销毁所有的表单数据
-        this.$refs['form'] && this.$refs['form'].resetFields();
-        (this.form = copyObj(this.formDef)), (this.dialogVisible = false);
-      });
-    },
-    handleClose() {
-      this.cancel();
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.container {
-  padding: 10px 0;
-}
+  .container {
+    padding: 10px 0;
+  }
 </style>

+ 5 - 4
src/views/saleManage/contact/components/darwerComponents/followList.vue

@@ -30,7 +30,7 @@
           type="primary"
           :underline="false"
           icon="el-icon-edit"
-          @click="openEdit('edit', row)"
+          @click="openEdit('edit', row,$index )"
         >
           修改
         </el-link>
@@ -156,17 +156,18 @@ export default {
     },
     handleBankDel(row, index) {
       this.list.splice(index, 1);
-      this.save();
+      // this.save();
     },
     done({data,type,index}) {
+      data.linkId=data.linkId.toString()
       if(type=='add'){
         this.list.unshift(data);
       }else{
-          this.$set(this.list,index,data)
+        this.$set(this.list,index,data)
       }
     },
     save() {
-      this.form.base.opportunityFollowupList = this.list;
+      this.form.base.opportunityFollowupList = this.list
       contactUpdate(this.form)
         .then((res) => {
           this.$message.success('修改成功');

+ 1 - 1
src/views/saleManage/contact/index.vue

@@ -376,7 +376,7 @@
             slot: 'enterpriseScale'
           },
           {
-            prop: 'followThroughTime',
+            prop: 'lastFollowThroughTime',
             label: '最近跟进时间',
             align: 'center',
             showOverflowTooltip: true,

+ 3 - 8
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -54,9 +54,7 @@
             />
           </el-form-item>
           <el-form-item label="订单类型" prop="needProduce">
-            <el-radio v-model="form.needProduce" :label="1">{{
-              clientEnvironmentId == 5 ? '有客户生产性订单' : '生产性订单'
-            }}</el-radio>
+            <el-radio v-model="form.needProduce" :label="1">有客户生产性订单</el-radio>
             <el-radio v-model="form.needProduce" :label="0"
               >库存式订单</el-radio
             >
@@ -1066,7 +1064,7 @@
         this.processSubmitDialogFlag = true;
         let businessType =
           data.needProduce == 1
-            ? '生产性订单'
+            ? '有客户生产性订单'
             : data.needProduce == 2
             ? '无客户生产性订单'
             : data.needProduce == 4
@@ -1080,10 +1078,7 @@
             variables: {
               businessCode: data.orderNo,
               businessName: data.partaName,
-              businessType:
-                this.clientEnvironmentId == 5 && businessType == '生产性订单'
-                  ? '有客户生产性订单'
-                  : businessType
+              businessType:businessType
             }
           };
           this.$refs.processSubmitDialogRef.init(params);

+ 1 - 3
src/views/saleManage/saleOrder/components/darwerComponents/saleOrderInfo.vue

@@ -53,9 +53,7 @@
             prop="needProduce"
             style="margin-bottom: 22px"
           >
-            <el-radio v-model="form.needProduce" :label="1">{{
-              clientEnvironmentId == 5 ? '有客户生产性订单' : '生产性订单'
-            }}</el-radio>
+            <el-radio v-model="form.needProduce" :label="1">有客户生产性订单</el-radio>
             <el-radio v-model="form.needProduce" disabled :label="0"
               >库存式订单</el-radio
             >

+ 106 - 102
src/views/saleManage/saleOrder/components/detailDialog.vue

@@ -84,16 +84,20 @@
               prop="needProduce"
               style="margin-bottom: 22px"
             >
-              <el-radio v-model="form.needProduce" :label="1">{{
-                clientEnvironmentId == 5 ? '有客户生产性订单' : '生产性订单'
-              }}</el-radio>
+              <el-radio v-model="form.needProduce" :label="1"
+                >有客户生产性订单</el-radio
+              >
               <el-radio v-model="form.needProduce" disabled :label="0"
                 >库存式订单</el-radio
               >
               <el-radio v-model="form.needProduce" disabled :label="2"
                 >无客户生产性订单</el-radio
               >
-              <el-radio v-model="form.needProduce" disabled :label="4"   v-if="clientEnvironmentId != 5"
+              <el-radio
+                v-model="form.needProduce"
+                disabled
+                :label="4"
+                v-if="clientEnvironmentId != 5"
                 >不定向订单</el-radio
               >
             </el-form-item>
@@ -229,120 +233,120 @@
 </template>
 
 <script>
-import { getSaleOrderDetail } from '@/api/saleManage/saleorder';
-import invoiceList from '@/views/saleManage/saleOrder/orderAssociation/invoiceList.vue';
-import returnGoodsList from '@/views/saleManage/saleOrder/orderAssociation/returnGoodsList.vue';
-import accountstatementList from '@/views/saleManage/saleOrder/orderAssociation/accountstatementList.vue';
-import { getFile } from '@/api/system/file';
-import dictMixins from '@/mixins/dictMixins';
-import { copyObj } from '@/utils/util';
-import bpmDetail from '@/views/bpm/processInstance/detail.vue';
-import inventoryTabledetail from '@/BIZComponents/inventoryTableDetails.vue';
-import fileMain from '@/components/addDoc/index.vue';
-import typeList from './typeList.vue';
+  import { getSaleOrderDetail } from '@/api/saleManage/saleorder';
+  import invoiceList from '@/views/saleManage/saleOrder/orderAssociation/invoiceList.vue';
+  import returnGoodsList from '@/views/saleManage/saleOrder/orderAssociation/returnGoodsList.vue';
+  import accountstatementList from '@/views/saleManage/saleOrder/orderAssociation/accountstatementList.vue';
+  import { getFile } from '@/api/system/file';
+  import dictMixins from '@/mixins/dictMixins';
+  import { copyObj } from '@/utils/util';
+  import bpmDetail from '@/views/bpm/processInstance/detail.vue';
+  import inventoryTabledetail from '@/BIZComponents/inventoryTableDetails.vue';
+  import fileMain from '@/components/addDoc/index.vue';
+  import typeList from './typeList.vue';
 
-export default {
-  mixins: [dictMixins],
-  components: {
-    fileMain,
-    invoiceList,
-    returnGoodsList,
-    accountstatementList,
-    bpmDetail,
-    inventoryTabledetail,
-    typeList
-  },
-  data() {
-    return {
-      activeComp: 'order',
-      tabOptions: [
-        { key: 'order', name: '订单详情' },
-        { key: 'bpm', name: '流程详情' },
-        { key: 'invoice', name: '发货列表' },
-        { key: 'returnorder', name: '退货列表' },
-        { key: 'accountstatement', name: '对账列表' }
-      ],
-      visible: false,
-      detailId: '',
-      title: '详情',
-      cacheKeyUrl: 'eos-saleManage-saleOrder-inventoryTableDetails',
-      form: {
-        orderFiles: []
-      }
-    };
-  },
-  computed: {
+  export default {
+    mixins: [dictMixins],
+    components: {
+      fileMain,
+      invoiceList,
+      returnGoodsList,
+      accountstatementList,
+      bpmDetail,
+      inventoryTabledetail,
+      typeList
+    },
+    data() {
+      return {
+        activeComp: 'order',
+        tabOptions: [
+          { key: 'order', name: '订单详情' },
+          { key: 'bpm', name: '流程详情' },
+          { key: 'invoice', name: '发货列表' },
+          { key: 'returnorder', name: '退货列表' },
+          { key: 'accountstatement', name: '对账列表' }
+        ],
+        visible: false,
+        detailId: '',
+        title: '详情',
+        cacheKeyUrl: 'eos-saleManage-saleOrder-inventoryTableDetails',
+        form: {
+          orderFiles: []
+        }
+      };
+    },
+    computed: {
       clientEnvironmentId() {
         return this.$store.state.user.info.clientEnvironmentId;
       }
     },
-  methods: {
-    async open(row) {
-      this.form = row;
-      this.visible = true;
-      this.getDetailData(row.id);
-      this.detailId = row.id;
-    },
-    toSendTab(tabName) {
-      this.activeComp = tabName;
-    },
-    cancel() {
-      this.$nextTick(() => {
-        // 关闭后,销毁所有的表单数据
-        (this.form = copyObj(this.formDef)),
-          (this.otherForm = copyObj(this.otherFormDef)),
-          (this.tableBankData = []);
-        this.tableLinkData = [];
-        this.visible = false;
-      });
-    },
-
-    async getDetailData(id) {
-      this.loading = true;
-      const data = await getSaleOrderDetail(id);
-      this.loading = false;
-      if (data) {
-        this.form = data;
+    methods: {
+      async open(row) {
+        this.form = row;
+        this.visible = true;
+        this.getDetailData(row.id);
+        this.detailId = row.id;
+      },
+      toSendTab(tabName) {
+        this.activeComp = tabName;
+      },
+      cancel() {
         this.$nextTick(() => {
-          this.$refs.inventoryTabledetailRef &&
-            this.$refs.inventoryTabledetailRef.putTableValue(data);
-          this.$refs.typeListRef &&
-            this.$refs.typeListRef.putTableValue(data.typedetailList);
+          // 关闭后,销毁所有的表单数据
+          (this.form = copyObj(this.formDef)),
+            (this.otherForm = copyObj(this.otherFormDef)),
+            (this.tableBankData = []);
+          this.tableLinkData = [];
+          this.visible = false;
         });
+      },
+
+      async getDetailData(id) {
+        this.loading = true;
+        const data = await getSaleOrderDetail(id);
+        this.loading = false;
+        if (data) {
+          this.form = data;
+          this.$nextTick(() => {
+            this.$refs.inventoryTabledetailRef &&
+              this.$refs.inventoryTabledetailRef.putTableValue(data);
+            this.$refs.typeListRef &&
+              this.$refs.typeListRef.putTableValue(data.typedetailList);
+          });
+        }
       }
     }
-  }
-};
+  };
 </script>
 
 <style scoped lang="scss">
-.ele-dialog-form {
-  .el-form-item {
-    margin-bottom: 10px;
+  .ele-dialog-form {
+    .el-form-item {
+      margin-bottom: 10px;
+    }
   }
-}
 
-.headbox {
-  display: flex;
-  justify-content: flex-start;
-  align-items: center;
-  .amount {
-    font-size: 14px;
-    font-weight: bold;
-    margin-right: 20px;
+  .headbox {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    .amount {
+      font-size: 14px;
+      font-weight: bold;
+      margin-right: 20px;
+    }
   }
-}
 
-.switch_left ul .active {
-  border-top: 4px solid var(--color-primary);
-  color: var(--color-primary-5);
-}
+  .switch_left ul .active {
+    border-top: 4px solid var(--color-primary);
+    color: var(--color-primary-5);
+  }
 
-.switch {
-  padding-bottom: 20px;
-}
+  .switch {
+    padding-bottom: 20px;
+  }
 
-:deep .divider .content {
-  justify-content: flex-start;
-}
+  :deep .divider .content {
+    justify-content: flex-start;
+  }
 </style>

+ 3 - 6
src/views/saleManage/saleOrder/index.vue

@@ -414,7 +414,7 @@
             formatter: (_row, _column, cellValue) => {
               let businessType =
                 cellValue == 1
-                  ? '生产性订单'
+                  ? '有客户生产性订单'
                   : cellValue == 2
                   ? '无客户生产性订单'
                   : cellValue == 4
@@ -709,7 +709,7 @@
         this.processSubmitDialogFlag = true;
         let businessType =
           data.needProduce == 1
-            ? '生产性订单'
+            ? '有客户生产性订单'
             : data.needProduce == 2
             ? '无客户生产性订单'
             : data.needProduce == 4
@@ -723,10 +723,7 @@
             variables: {
               businessCode: data.orderNo,
               businessName: data.partaName,
-              businessType:
-                this.clientEnvironmentId == 5 && businessType == '生产性订单'
-                  ? '有客户生产性订单'
-                  : businessType
+              businessType:businessType
             }
           };
           this.$refs.processSubmitDialogRef.init(params);