yangfeng
2023-10-13 3d04f62e6c9124e2d37b5d09191a02fc6390d16f
src/views/sales/salesReturn/AddSalesReturnDialog.vue
@@ -24,10 +24,26 @@
          <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
                      style="width:100%"
                      style="width: 100%"
                      v-model="editConfig.infomation.client_name"
                      :fetch-suggestions="
                        (queryString, callback) => {
@@ -50,31 +66,12 @@
                  </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="合同订单">
                  <div class="custom-name">
                    <el-autocomplete
                    style="width:100%"
                      style="width: 100%"
                      v-model="editConfig.infomation.salesDetailNumber"
                      :fetch-suggestions="
                        (queryString, callback) => {
@@ -125,7 +122,7 @@
                    value-format="yyyy-MM-dd"
                    type="date"
                    placeholder="选择日期"
                    style="width:100%"
                    style="width: 100%"
                  >
                  </el-date-picker>
                </el-form-item>
@@ -140,7 +137,7 @@
                <el-form-item label="状态" prop="salesReturnStatusId">
                  <div class="common-select">
                    <el-select
                    style="width:100%"
                      style="width: 100%"
                      v-model="editConfig.infomation.salesReturnStatusId"
                      placeholder="请选择"
                      class="common-select-sel"
@@ -162,7 +159,7 @@
              <el-col :span="24">
                <el-form-item label="退货原因" prop="reason" label-width="15%">
                  <el-input
                  style="width:100%"
                    style="width: 100%"
                    type="textarea"
                    :autosize="{ minRows: 2 }"
                    v-model="editConfig.infomation.reason"
@@ -249,10 +246,10 @@
import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog"
import { getProductList } from "@/api/common/other"
import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog"
import codeMixin from "@/views/client/followupRecords/mixin/codeMixin";
import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"
export default {
  name: "AddSalesReturnDialog",
  mixins:[codeMixin],
  mixins: [codeMixin],
  props: {
    editCommonConfig: {
      type: Object,
@@ -317,27 +314,27 @@
    this.setTableForm()
    this.getCommonData()
    this.getProductList()
    this.formInfo();
    this.formInfo()
  },
  watch:{
    'editClientManageConfig.visible'(val){
      if(val){
  watch: {
    "editClientManageConfig.visible"(val) {
      if (val) {
        this.formInfo()
      }
    },
    'editClientManageConfig.infomation.codeStandID'(){
    "editClientManageConfig.infomation.codeStandID"() {
      this.formInfo()
    }
  },
  methods: {
    formInfo(){
      this.objCode.type='销售退货编码'
      this.objCode.codeStandID = ''
      if(this.editConfig.infomation.codeStandID){
        this.objCode.codeStandID = this.editConfig.infomation.codeStandID;
    formInfo() {
      this.objCode.type = "销售退货编码"
      this.objCode.codeStandID = ""
      if (this.editConfig.infomation.codeStandID) {
        this.objCode.codeStandID = this.editConfig.infomation.codeStandID
      }
      this.getRCodeStandardList();
    },
      this.getRCodeStandardList()
    },
    getCommonData() {
      getAllData()
        .then((res) => {
@@ -419,7 +416,8 @@
          salesReturnStatusId: data.salesReturnStatusId || 0,
          sourceId: this.SalesDetailsId,
          sourceType: 1
        }
        },
        codeRule: this.codeRule
      }
      return params
    },