yangfeng
2023-10-13 2e54592b7adf069f6ddfc9348c6daf9612f34f79
src/views/sales/refundForm/AddRefundFormDialog.vue
@@ -24,6 +24,22 @@
          <div class="basic-info-view">
            <el-row>
              <el-col :span="12">
                <el-form-item label="退款单编号" prop="number">
                  <WordInput
                    v-if="codenumer && (explain != '' || isIdDisabled) && method == 0"
                    :codenumer="codenumer"
                    :sum="sum"
                    :disabled="editConfig.title !== '新建' || isIdDisabled"
                    :inputValue="inputValue"
                    @codeList="codeList"
                  />
                  <span v-else-if="method == 0" style="color: #f56c6c"
                    >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span
                  >
                  <span v-else>{{ editConfig.title === "新建" ? "自动生成" : editConfig.infomation.number }}</span>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="客户名称" prop="client_name">
                  <div class="custom-name">
                    <el-autocomplete
@@ -50,31 +66,11 @@
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="退款单编号" prop="number">
                  <WordInput
                    v-if="codenumer && (explain != '' || isIdDisabled)&&method == 0"
                    :codenumer="codenumer"
                    :sum="sum"
                    :disabled="editConfig.infomation.id || isIdDisabled"
                    :inputValue="inputValue"
                    @codeList="codeList"
                  />
                  <span v-else-if="method == 0" style="color: #f56c6c"
                    >请优先配置编码规范
                    <el-button type="text"  @click="numberClick">
                        配置规范
                      </el-button
                    ></span
                  >
                  <span v-else>{{editConfig.title==='新建'? '自动生成': editConfig.infomation.number}}</span>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="销售退货单" prop="sale_return_nunber">
                  <div class="custom-name">
                    <el-autocomplete
                    style="width:100%"
                      v-model="editConfig.infomation.sale_return_nunber"
                      :fetch-suggestions="
@@ -317,7 +313,7 @@
import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog"
import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog"
import { getPaymentTypeList } from "@/api/common/payment"
import codeMixin from "@/views/client/followupRecords/mixin/codeMixin";
import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"
export default {
  name: "AddRefundFormDialog",
  mixins:[codeMixin],
@@ -389,26 +385,26 @@
    this.$store.dispatch("geReturnList")
    this.setTableForm()
    this.getCommonData()
    this.formInfo();
    this.formInfo()
  },
  watch:{
    'editClientManageConfig.visible'(val){
    "editClientManageConfig.visible"(val) {
      if(val){
        this.formInfo()
      }
    },
    'editClientManageConfig.infomation.codeStandID'(){
    "editClientManageConfig.infomation.codeStandID"() {
      this.formInfo()
    }
  },
  methods: {
    formInfo(){
      this.objCode.type='销售退款编码'
      this.objCode.codeStandID = ''
      this.objCode.type = "销售退款编码"
      this.objCode.codeStandID = ""
      if(this.editConfig.infomation.codeStandID){
        this.objCode.codeStandID = this.editConfig.infomation.codeStandID;
        this.objCode.codeStandID = this.editConfig.infomation.codeStandID
      }
      this.getRCodeStandardList();
      this.getRCodeStandardList()
    }, 
    getCommonData() {
      getAllData().then((res) => {
@@ -485,8 +481,7 @@
          sourceId: this.sourceId || 0,
          sourceType: 1
        },
        codeRule:this.codeRule,
        codeRule: this.codeRule
      }
      return params
    },