| | |
| | | const selectedIndex = e.target.value; |
| | | const selectedCustomer = storage[selectedIndex]; |
| | | |
| | | // // 检查是否选择了相同的客户 |
| | | // if (code === "customerName1" && this.selClientIndex2 === selectedIndex) { |
| | | // uni.showToast({ |
| | | // title: "不能选择相同的客户", |
| | | // icon: "none", |
| | | // }); |
| | | // return; |
| | | // } |
| | | // if (code === "customerName2" && this.selClientIndex1 === selectedIndex) { |
| | | // uni.showToast({ |
| | | // title: "不能选择相同的客户", |
| | | // icon: "none", |
| | | // }); |
| | | // return; |
| | | // } |
| | | // 检查是否选择了相同的客户 |
| | | if (code === "customerName1" && this.selClientIndex2 === selectedIndex) { |
| | | uni.showToast({ |
| | | title: "不能选择相同的客户", |
| | | icon: "none", |
| | | }); |
| | | return; |
| | | } |
| | | if (code === "customerName2" && this.selClientIndex1 === selectedIndex) { |
| | | uni.showToast({ |
| | | title: "不能选择相同的客户", |
| | | icon: "none", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (code === "customerName2") { |
| | | this.selClientIndex2 = selectedIndex; |
| | |
| | | |
| | | const productType = this.form.productType; |
| | | const selectedWorkshop = storage[e.target.value]; |
| | | |
| | | console.log('选择的车间:', selectedWorkshop); |
| | | // 检查产品类型是否为铜杆(值为TG01) |
| | | if (productType === "TG01") { |
| | | // 铜杆只能选择铜杆相关车间 |
| | |
| | | } |
| | | |
| | | this.workshopIndex = e.target.value; |
| | | this.form.workshop = selectedWorkshop.label; |
| | | this.form.workshop = selectedWorkshop.value; |
| | | }, |
| | | // 司磅员 |
| | | weighmanChange(e, storage) { |