|  | @@ -16,12 +16,21 @@
 | 
	
		
			
				|  |  |                  <el-button class="el-button--small-yh" v-if="form.id && form.status == 0" style="margin-left: 6px;"
 | 
	
		
			
				|  |  |                      type="success" size="small" @click="editCustomer(1)" :disabled="form.status == 1">提 交
 | 
	
		
			
				|  |  |                  </el-button>
 | 
	
		
			
				|  |  | -                <el-button class="el-button--small-yh" v-if="form.status == 1" style="margin-left: 6px;" type="success"
 | 
	
		
			
				|  |  | +                <!-- <el-button class="el-button--small-yh" v-if="form.status == 1" style="margin-left: 6px;" type="success"
 | 
	
		
			
				|  |  |                      size="small" @click="editCustomer(2)">通 过
 | 
	
		
			
				|  |  |                  </el-button>
 | 
	
		
			
				|  |  |                  <el-button class="el-button--small-yh" v-if="form.status == 1" style="margin-left: 6px;" type="danger"
 | 
	
		
			
				|  |  |                      size="small" @click="approve()">驳 回
 | 
	
		
			
				|  |  | -                </el-button>
 | 
	
		
			
				|  |  | +                </el-button> -->
 | 
	
		
			
				|  |  | +                <el-dropdown v-if="form.status == 1">
 | 
	
		
			
				|  |  | +                    <el-button style="margin-left: 6px;" type="success" size="small">
 | 
	
		
			
				|  |  | +                        审 核<i class="el-icon-arrow-down el-icon--right"></i>
 | 
	
		
			
				|  |  | +                    </el-button>
 | 
	
		
			
				|  |  | +                    <el-dropdown-menu slot="dropdown">
 | 
	
		
			
				|  |  | +                        <el-dropdown-item @click.native="auditPlan(2)">通过</el-dropdown-item>
 | 
	
		
			
				|  |  | +                        <el-dropdown-item @click.native="approve()">驳回</el-dropdown-item>
 | 
	
		
			
				|  |  | +                    </el-dropdown-menu>
 | 
	
		
			
				|  |  | +                </el-dropdown>
 | 
	
		
			
				|  |  |              </div>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |          <div style="margin-top: 50px">
 | 
	
	
		
			
				|  | @@ -204,12 +213,12 @@
 | 
	
		
			
				|  |  |          <el-dialog title="驳回数据" append-to-body :visible.sync="approveVisible" width="30%" :close-on-click-modal="false"
 | 
	
		
			
				|  |  |              v-dialog-drag>
 | 
	
		
			
				|  |  |              <span>
 | 
	
		
			
				|  |  | -                <el-input type="textarea" :rows="5" placeholder="请输入驳回原因" v-model="textarea">
 | 
	
		
			
				|  |  | +                <el-input type="textarea" :rows="5" placeholder="请输入驳回原因" v-model="auditMsg">
 | 
	
		
			
				|  |  |                  </el-input>
 | 
	
		
			
				|  |  |              </span>
 | 
	
		
			
				|  |  |              <span slot="footer" class="dialog-footer">
 | 
	
		
			
				|  |  |                  <el-button @click="approveVisible = false" size="mini">取消</el-button>
 | 
	
		
			
				|  |  | -                <el-button type="danger" @click="approveVisible = false; editCustomer(3)" size="mini">确定</el-button>
 | 
	
		
			
				|  |  | +                <el-button type="danger" @click="approveVisible = false; auditPlan(3)" size="mini">确定</el-button>
 | 
	
		
			
				|  |  |              </span>
 | 
	
		
			
				|  |  |          </el-dialog>
 | 
	
		
			
				|  |  |      </div>
 | 
	
	
		
			
				|  | @@ -228,12 +237,13 @@ import check from "@/components/checkL/check";
 | 
	
		
			
				|  |  |  import { getCorpType, getList } from "@/api/tirePartsMall/basicData/commodityInformation"
 | 
	
		
			
				|  |  |  import { isProcurement } from "@/api/basicData/configuration";
 | 
	
		
			
				|  |  |  import commodity from "../../configuration/commodity.json";
 | 
	
		
			
				|  |  | -import { getDetails, submit, itemRemove } from "@/api/storehouse/plan.js";
 | 
	
		
			
				|  |  | +import { getDetails, submit, itemRemove, auditPlan } from "@/api/storehouse/plan.js";
 | 
	
		
			
				|  |  |  import dicSelect from "@/components/dicSelect/main";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |      name: "detailsPage",
 | 
	
		
			
				|  |  |      data() {
 | 
	
		
			
				|  |  |          return {
 | 
	
		
			
				|  |  | +            auditMsg: null,
 | 
	
		
			
				|  |  |              approveVisible: false,
 | 
	
		
			
				|  |  |              excelBox: false,
 | 
	
		
			
				|  |  |              numberDecimal: 0,
 | 
	
	
		
			
				|  | @@ -820,7 +830,7 @@ export default {
 | 
	
		
			
				|  |  |                      getCustom({ id: row.id }).then(res => {
 | 
	
		
			
				|  |  |                          if (res.data.data) {
 | 
	
		
			
				|  |  |                              this.dicUrlWithCustomId = res.data.data.id ? res.data.data.id : ''
 | 
	
		
			
				|  |  | -                            this.form.storageId = this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
 | 
	
		
			
				|  |  | +                            // this.form.storageId = this.form.storageId ? this.form.storageId : res.data.data.deliveryWarehouseId
 | 
	
		
			
				|  |  |                              this.form.contacts = res.data.data.corpsAttnList[0].cname
 | 
	
		
			
				|  |  |                              this.form.phone = res.data.data.corpsAttnList[0].tel
 | 
	
		
			
				|  |  |                              this.contactsOption = res.data.data.corpsAddrList
 | 
	
	
		
			
				|  | @@ -830,7 +840,7 @@ export default {
 | 
	
		
			
				|  |  |                      this.form.customerId = null
 | 
	
		
			
				|  |  |                      this.form.customerName = null
 | 
	
		
			
				|  |  |                      this.dicUrlWithCustomId = null
 | 
	
		
			
				|  |  | -                    this.form.storageId = null
 | 
	
		
			
				|  |  | +                    // this.form.storageId = null
 | 
	
		
			
				|  |  |                      this.form.contacts = null
 | 
	
		
			
				|  |  |                      this.form.phone = null
 | 
	
		
			
				|  |  |                  }
 | 
	
	
		
			
				|  | @@ -1173,6 +1183,38 @@ export default {
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          approve(type) {
 | 
	
		
			
				|  |  |              this.approveVisible = true
 | 
	
		
			
				|  |  | +            this.auditMsg = null
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        auditPlan(type) {
 | 
	
		
			
				|  |  | +            if (type == 2) {
 | 
	
		
			
				|  |  | +                this.$confirm('是否提交审核?', '提示', {
 | 
	
		
			
				|  |  | +                    confirmButtonText: '确定',
 | 
	
		
			
				|  |  | +                    cancelButtonText: '取消',
 | 
	
		
			
				|  |  | +                    type: 'warning'
 | 
	
		
			
				|  |  | +                }).then(() => {
 | 
	
		
			
				|  |  | +                    let obj = {
 | 
	
		
			
				|  |  | +                        id: this.form.id,
 | 
	
		
			
				|  |  | +                        status: type,
 | 
	
		
			
				|  |  | +                        auditMsg: type == 3 ? this.auditMsg : null,
 | 
	
		
			
				|  |  | +                        version: this.form.version
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    auditPlan(obj).then(res => {
 | 
	
		
			
				|  |  | +                        this.getDetail(this.form.id)
 | 
	
		
			
				|  |  | +                    })
 | 
	
		
			
				|  |  | +                })
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            if (type == 3) {
 | 
	
		
			
				|  |  | +                let obj = {
 | 
	
		
			
				|  |  | +                    id: this.form.id,
 | 
	
		
			
				|  |  | +                    status: type,
 | 
	
		
			
				|  |  | +                    auditMsg: type == 3 ? this.auditMsg : null,
 | 
	
		
			
				|  |  | +                    version: this.form.version
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                auditPlan(obj).then(res => {
 | 
	
		
			
				|  |  | +                    this.getDetail(this.form.id)
 | 
	
		
			
				|  |  | +                })
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          //修改提交触发
 | 
	
		
			
				|  |  |          editCustomer(type) {
 | 
	
	
		
			
				|  | @@ -1201,19 +1243,22 @@ export default {
 | 
	
		
			
				|  |  |                              this.form.planItemsList[i].sendNum = 0
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  | -                    this.form.status = type
 | 
	
		
			
				|  |  | +                    let obj = {
 | 
	
		
			
				|  |  | +                        ...this.form,
 | 
	
		
			
				|  |  | +                        storageName: this.form.$storageId ? this.form.$storageId : '',
 | 
	
		
			
				|  |  | +                        status: type,
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                      const loading = this.$loading({
 | 
	
		
			
				|  |  |                          lock: true,
 | 
	
		
			
				|  |  |                          text: '加载中',
 | 
	
		
			
				|  |  |                          spinner: 'el-icon-loading',
 | 
	
		
			
				|  |  |                          background: 'rgba(255,255,255,0.7)'
 | 
	
		
			
				|  |  |                      });
 | 
	
		
			
				|  |  | -                    this.form.storageName = this.form.$storageId ? this.form.$storageId : ''
 | 
	
		
			
				|  |  | -                    submit(this.form).then(res => {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                    submit(obj).then(res => {
 | 
	
		
			
				|  |  |                          this.$message.success("操作成功");
 | 
	
		
			
				|  |  |                          this.mingxibaocun = true
 | 
	
		
			
				|  |  |                          this.getDetail(res.data.data)
 | 
	
		
			
				|  |  | -                        loading.close();
 | 
	
		
			
				|  |  |                      }).finally(() => {
 | 
	
		
			
				|  |  |                          loading.close();
 | 
	
		
			
				|  |  |                      });
 | 
	
	
		
			
				|  | @@ -1319,7 +1364,11 @@ export default {
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          rowAdd(row) {
 | 
	
		
			
				|  |  |              if (!this.form.customerId) {
 | 
	
		
			
				|  |  | -                this.$message.error('请选择供应商')
 | 
	
		
			
				|  |  | +                this.$message.error('请选择货主')
 | 
	
		
			
				|  |  | +                return
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            if (!this.form.storageId) {
 | 
	
		
			
				|  |  | +                this.$message.error('请选择仓库')
 | 
	
		
			
				|  |  |                  return
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              this.optionContactsBack.column.forEach(its => {
 |