|  | @@ -322,8 +322,7 @@
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |            <!-- 采购 -->
 |  |            <!-- 采购 -->
 | 
											
												
													
														|  |            <el-button
 |  |            <el-button
 | 
											
												
													
														|  | -            v-if="
 |  | 
 | 
											
												
													
														|  | -              isSubscribeExamineCG && ((row.statue == 11 && row.departmentName != '挤奶处') || (row.departmentName == '挤奶处' && row.statue == 15))"
 |  | 
 | 
											
												
													
														|  | 
 |  | +            v-if="isSubscribeExamineCG && (row.statue == 11 || row.statue == 15)"
 | 
											
												
													
														|  |              style="display: inline-block"
 |  |              style="display: inline-block"
 | 
											
												
													
														|  |              type="success"
 |  |              type="success"
 | 
											
												
													
														|  |              size="mini"
 |  |              size="mini"
 | 
											
										
											
												
													
														|  | @@ -1628,8 +1627,7 @@
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                  <!-- 采购 -->
 |  |                  <!-- 采购 -->
 | 
											
												
													
														|  |                  <el-button
 |  |                  <el-button
 | 
											
												
													
														|  | -                  v-if="
 |  | 
 | 
											
												
													
														|  | -                    isSubscribeExamineCG && ((seeTemp.statue == 11 && seeTemp.departmentName != '挤奶处') || (seeTemp.departmentName == '挤奶处' && seeTemp.statue == 15))"
 |  | 
 | 
											
												
													
														|  | 
 |  | +                  v-if="isSubscribeExamineCG && (seeTemp.statue == 11 || seeTemp.statue == 15)"
 | 
											
												
													
														|  |                    type="success"
 |  |                    type="success"
 | 
											
												
													
														|  |                    style="display: inline-block"
 |  |                    style="display: inline-block"
 | 
											
												
													
														|  |                    @click="handleExamine5(row)"
 |  |                    @click="handleExamine5(row)"
 | 
											
										
											
												
													
														|  | @@ -2469,8 +2467,7 @@
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                  <!-- 采购 -->
 |  |                  <!-- 采购 -->
 | 
											
												
													
														|  |                  <el-button
 |  |                  <el-button
 | 
											
												
													
														|  | -                  v-if="
 |  | 
 | 
											
												
													
														|  | -                    isSubscribeExamineCG && ((seeTemp.statue == 11 && seeTemp.departmentName != '挤奶处') || (seeTemp.departmentName == '挤奶处' && seeTemp.statue == 15))"
 |  | 
 | 
											
												
													
														|  | 
 |  | +                  v-if="isSubscribeExamineCG && (seeTemp.statue == 11 || seeTemp.statue == 15)"
 | 
											
												
													
														|  |                    type="success"
 |  |                    type="success"
 | 
											
												
													
														|  |                    style="display: inline-block"
 |  |                    style="display: inline-block"
 | 
											
												
													
														|  |                    @click="handleExamine5(row)"
 |  |                    @click="handleExamine5(row)"
 | 
											
										
											
												
													
														|  | @@ -2537,6 +2534,7 @@ export default {
 | 
											
												
													
														|  |    directives: { waves },
 |  |    directives: { waves },
 | 
											
												
													
														|  |    data() {
 |  |    data() {
 | 
											
												
													
														|  |      return {
 |  |      return {
 | 
											
												
													
														|  | 
 |  | +      providerNames: '',
 | 
											
												
													
														|  |        isSubscribeAdd: [],
 |  |        isSubscribeAdd: [],
 | 
											
												
													
														|  |        isSubscribeSpecial: [],
 |  |        isSubscribeSpecial: [],
 | 
											
												
													
														|  |        isSubscribeExamineSBZG: [],
 |  |        isSubscribeExamineSBZG: [],
 | 
											
										
											
												
													
														|  | @@ -3684,16 +3682,18 @@ export default {
 | 
											
												
													
														|  |            console.log('有数据-走新保存')
 |  |            console.log('有数据-走新保存')
 | 
											
												
													
														|  |            const url = 'authdata/partpurchase/edit'
 |  |            const url = 'authdata/partpurchase/edit'
 | 
											
												
													
														|  |            const dataArr = []
 |  |            const dataArr = []
 | 
											
												
													
														|  | -          for (let i = 0; i < this.listAdd.length; i++) {
 |  | 
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +          console.log(this.providerNames, 'hss')
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +          for (let i = 0; i < this.listAdd.length; i++) {
 | 
											
												
													
														|  |              // 若有合单,走/edit的接口 再次对价格做个校验判断;
 |  |              // 若有合单,走/edit的接口 再次对价格做个校验判断;
 | 
											
												
													
														|  | -            if (parseFloat(this.listAdd[i].price) == 0) {
 |  | 
 | 
											
												
													
														|  | -                this.$message({
 |  | 
 | 
											
												
													
														|  | -                  type: 'warning',
 |  | 
 | 
											
												
													
														|  | -                  message: '价格请输入正数,最多保留小数点后五位',
 |  | 
 | 
											
												
													
														|  | -                  duration: 2000
 |  | 
 | 
											
												
													
														|  | -                })
 |  | 
 | 
											
												
													
														|  | -                return false
 |  | 
 | 
											
												
													
														|  | 
 |  | +            if (parseFloat(this.listAdd[i].price) == 0 || this.listAdd[i].price == '') {
 | 
											
												
													
														|  | 
 |  | +              this.$message({
 | 
											
												
													
														|  | 
 |  | +                type: 'warning',
 | 
											
												
													
														|  | 
 |  | +                message: '价格请输入正数,最多保留小数点后五位',
 | 
											
												
													
														|  | 
 |  | +                duration: 2000
 | 
											
												
													
														|  | 
 |  | +              })
 | 
											
												
													
														|  | 
 |  | +              return false
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |              if (this.listAdd[i].myId !== undefined) {
 |  |              if (this.listAdd[i].myId !== undefined) {
 | 
											
												
													
														|  |                this.listAdd[i].id = 0
 |  |                this.listAdd[i].id = 0
 | 
											
										
											
												
													
														|  | @@ -3750,6 +3750,7 @@ export default {
 | 
											
												
													
														|  |              dataArr.push(obj)
 |  |              dataArr.push(obj)
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  |            const data = dataArr
 |  |            const data = dataArr
 | 
											
												
													
														|  | 
 |  | +          console.log(data, 'hss===1')
 | 
											
												
													
														|  |            postJson(url, data).then((response) => {
 |  |            postJson(url, data).then((response) => {
 | 
											
												
													
														|  |              if (response.msg !== 'fail') {
 |  |              if (response.msg !== 'fail') {
 | 
											
												
													
														|  |                this.get_table_data()
 |  |                this.get_table_data()
 | 
											
										
											
												
													
														|  | @@ -6447,13 +6448,31 @@ export default {
 | 
											
												
													
														|  |            if (this.createTemp.markBackend) {
 |  |            if (this.createTemp.markBackend) {
 | 
											
												
													
														|  |              console.log('有数据-走新保存', this.listAdd)
 |  |              console.log('有数据-走新保存', this.listAdd)
 | 
											
												
													
														|  |              const url = 'authdata/partpurchase/edit'
 |  |              const url = 'authdata/partpurchase/edit'
 | 
											
												
													
														|  | 
 |  | +            this.providerNames = this.providerList.find(
 | 
											
												
													
														|  | 
 |  | +              (obj) => obj.id == this.createTemp.providerId
 | 
											
												
													
														|  | 
 |  | +            ).providerName
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |              const dataArr = []
 |  |              const dataArr = []
 | 
											
												
													
														|  | 
 |  | +            console.log(this.listAdd, 'hss===3//')
 | 
											
												
													
														|  |              for (let i = 0; i < this.listAdd.length; i++) {
 |  |              for (let i = 0; i < this.listAdd.length; i++) {
 | 
											
												
													
														|  | 
 |  | +              // 价格判断
 | 
											
												
													
														|  | 
 |  | +              if (parseFloat(this.listAdd[i].price) == 0 || this.listAdd[i].price == '') {
 | 
											
												
													
														|  | 
 |  | +                this.$message({
 | 
											
												
													
														|  | 
 |  | +                  type: 'warning',
 | 
											
												
													
														|  | 
 |  | +                  message: '价格请输入正数,最多保留小数点后五位',
 | 
											
												
													
														|  | 
 |  | +                  duration: 2000
 | 
											
												
													
														|  | 
 |  | +                })
 | 
											
												
													
														|  | 
 |  | +                return false
 | 
											
												
													
														|  | 
 |  | +              }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |                if (this.listAdd[i].myId !== undefined) {
 |  |                if (this.listAdd[i].myId !== undefined) {
 | 
											
												
													
														|  |                  this.listAdd[i].id = 0
 |  |                  this.listAdd[i].id = 0
 | 
											
												
													
														|  |                }
 |  |                }
 | 
											
												
													
														|  |                const obj = {
 |  |                const obj = {
 | 
											
												
													
														|  |                  id: parseFloat(this.listAdd[i].id),
 |  |                  id: parseFloat(this.listAdd[i].id),
 | 
											
												
													
														|  | 
 |  | +                contractId: this.listAdd[i].contractId.toString(),
 | 
											
												
													
														|  | 
 |  | +                providerName: this.providerNames,
 | 
											
												
													
														|  | 
 |  | +                providerId: this.createTemp.providerId,
 | 
											
												
													
														|  |                  bigId: parseFloat(this.createTemp.bigId),
 |  |                  bigId: parseFloat(this.createTemp.bigId),
 | 
											
												
													
														|  |                  pastureId: parseFloat(this.listAdd[i].pastureId),
 |  |                  pastureId: parseFloat(this.listAdd[i].pastureId),
 | 
											
												
													
														|  |                  partId: parseFloat(this.listAdd[i].partId),
 |  |                  partId: parseFloat(this.listAdd[i].partId),
 | 
											
										
											
												
													
														|  | @@ -6475,15 +6494,15 @@ export default {
 | 
											
												
													
														|  |                  ).toString(),
 |  |                  ).toString(),
 | 
											
												
													
														|  |                  employeId: parseFloat(this.createTemp.employeId)
 |  |                  employeId: parseFloat(this.createTemp.employeId)
 | 
											
												
													
														|  |                }
 |  |                }
 | 
											
												
													
														|  | -              if (this.listAdd[i].contractId) {
 |  | 
 | 
											
												
													
														|  | -                this.$set(
 |  | 
 | 
											
												
													
														|  | -                  this.listAdd[i],
 |  | 
 | 
											
												
													
														|  | -                  'contractId',
 |  | 
 | 
											
												
													
														|  | -                  this.listAdd[i].contractId.toString()
 |  | 
 | 
											
												
													
														|  | -                )
 |  | 
 | 
											
												
													
														|  | -              } else {
 |  | 
 | 
											
												
													
														|  | -                this.$set(this.listAdd[i], 'contractId', '')
 |  | 
 | 
											
												
													
														|  | -              }
 |  | 
 | 
											
												
													
														|  | 
 |  | +              // if (this.listAdd[i].contractId) {
 | 
											
												
													
														|  | 
 |  | +              //   this.$set(
 | 
											
												
													
														|  | 
 |  | +              //     this.listAdd[i],
 | 
											
												
													
														|  | 
 |  | +              //     'contractId',
 | 
											
												
													
														|  | 
 |  | +              //     this.listAdd[i].contractId.toString()
 | 
											
												
													
														|  | 
 |  | +              //   )
 | 
											
												
													
														|  | 
 |  | +              // } else {
 | 
											
												
													
														|  | 
 |  | +              //   this.$set(this.listAdd[i], 'contractId', '')
 | 
											
												
													
														|  | 
 |  | +              // }
 | 
											
												
													
														|  |                if (this.listAdd[i].storageAmount) {
 |  |                if (this.listAdd[i].storageAmount) {
 | 
											
												
													
														|  |                  obj.storageAmount = parseFloat(this.listAdd[i].storageAmount)
 |  |                  obj.storageAmount = parseFloat(this.listAdd[i].storageAmount)
 | 
											
												
													
														|  |                } else {
 |  |                } else {
 | 
											
										
											
												
													
														|  | @@ -6503,6 +6522,7 @@ export default {
 | 
											
												
													
														|  |                dataArr.push(obj)
 |  |                dataArr.push(obj)
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |              const data = dataArr
 |  |              const data = dataArr
 | 
											
												
													
														|  | 
 |  | +            console.log(data, 'hss===2//')
 | 
											
												
													
														|  |              postJson(url, data).then((response) => {
 |  |              postJson(url, data).then((response) => {
 | 
											
												
													
														|  |                if (response.msg !== 'fail') {
 |  |                if (response.msg !== 'fail') {
 | 
											
												
													
														|  |                  this.get_table_data()
 |  |                  this.get_table_data()
 |