|
|
@@ -1270,14 +1270,14 @@ export default {
|
|
1270
|
1270
|
dispatchhaocaiarrError: [
|
|
1271
|
1271
|
{
|
|
1272
|
1272
|
F_DicId: "",
|
|
1273
|
|
- F_Number: 1,
|
|
|
1273
|
+ F_Number: 0,
|
|
1274
|
1274
|
F_ReceiveUser: "",
|
|
1275
|
1275
|
},
|
|
1276
|
1276
|
],
|
|
1277
|
1277
|
dispatchhaocaiarrEdit:[
|
|
1278
|
1278
|
{
|
|
1279
|
1279
|
F_DicId: '',
|
|
1280
|
|
- F_Number: 1,
|
|
|
1280
|
+ F_Number: 0,
|
|
1281
|
1281
|
F_ReceiveUser: "",
|
|
1282
|
1282
|
},
|
|
1283
|
1283
|
],
|
|
|
@@ -1642,26 +1642,33 @@ export default {
|
|
1642
|
1642
|
});
|
|
1643
|
1643
|
},
|
|
1644
|
1644
|
zhddToColleagueFormChange(data) {
|
|
1645
|
|
- console.log(data, "zhddToColleagueFormChange");
|
|
1646
|
1645
|
this.zhddToColleagueForm.ToUserCode = data;
|
|
1647
|
1646
|
},
|
|
1648
|
1647
|
removeItem(index) {
|
|
1649
|
|
- console.log(index);
|
|
1650
|
1648
|
this.dispatchhaocaiarrError.splice(index, 1);
|
|
1651
|
1649
|
},
|
|
1652
|
1650
|
removeItemEdit(index) {
|
|
1653
|
|
- console.log(index);
|
|
1654
|
1651
|
this.dispatchhaocaiarrEdit.splice(index, 1);
|
|
1655
|
1652
|
},
|
|
1656
|
1653
|
handleChange(data, index) {
|
|
1657
|
|
- const obj = this.$refs["cascaderbb"][index].getCheckedNodes();
|
|
1658
|
|
- this.dispatchhaocaiarrError[index].F_DicId = data;
|
|
1659
|
|
- this.dispatchhaocaiarrError[index].F_DicName = obj[0].data.text;
|
|
|
1654
|
+ if(data){
|
|
|
1655
|
+ const obj = this.$refs["cascaderbb"][index].getCheckedNodes();
|
|
|
1656
|
+ this.dispatchhaocaiarrError[index].F_DicId = data;
|
|
|
1657
|
+ this.dispatchhaocaiarrError[index].F_DicName = obj[0].data.text;
|
|
|
1658
|
+ }else{
|
|
|
1659
|
+ this.dispatchhaocaiarrError[index].F_DicId = ""
|
|
|
1660
|
+ this.dispatchhaocaiarrError[index].F_DicName = ""
|
|
|
1661
|
+ }
|
|
1660
|
1662
|
},
|
|
1661
|
1663
|
handleChangeEdit(data, index) {
|
|
1662
|
|
- const obj = this.$refs["cascaderbbedit"][index].getCheckedNodes();
|
|
1663
|
|
- this.dispatchhaocaiarrEdit[index].F_DicId = data;
|
|
1664
|
|
- this.dispatchhaocaiarrEdit[index].F_DicName = obj[0].data.text;
|
|
|
1664
|
+ if(data){
|
|
|
1665
|
+ const obj = this.$refs["cascaderbbedit"][index].getCheckedNodes();
|
|
|
1666
|
+ this.dispatchhaocaiarrEdit[index].F_DicId = data;
|
|
|
1667
|
+ this.dispatchhaocaiarrEdit[index].F_DicName = obj[0].data.text;
|
|
|
1668
|
+ }else{
|
|
|
1669
|
+ this.dispatchhaocaiarrEdit[index].F_DicId = ""
|
|
|
1670
|
+ this.dispatchhaocaiarrEdit[index].F_DicName = ""
|
|
|
1671
|
+ }
|
|
1665
|
1672
|
},
|
|
1666
|
1673
|
handleChange1(data) {
|
|
1667
|
1674
|
this.returnWorkForm.key = data.split(",")[0];
|
|
|
@@ -2238,6 +2245,30 @@ export default {
|
|
2238
|
2245
|
this.imgrepairUrl = url;
|
|
2239
|
2246
|
},
|
|
2240
|
2247
|
submitForm(formName) {
|
|
|
2248
|
+ // console.log(this.dispatchhaocaiarrError)
|
|
|
2249
|
+ // return;
|
|
|
2250
|
+ if(formName === "dealWorkForm"){
|
|
|
2251
|
+ if(this.dispatchhaocaiarrError.length>0){
|
|
|
2252
|
+ const index = this.dispatchhaocaiarrError.findIndex((o) => {
|
|
|
2253
|
+ return !o.F_ReceiveUser || !o.F_DicName || !o.F_Number;
|
|
|
2254
|
+ });
|
|
|
2255
|
+ if (index >= 0) {
|
|
|
2256
|
+ this.$message.error("请选择对应物资信息");
|
|
|
2257
|
+ return;
|
|
|
2258
|
+ }
|
|
|
2259
|
+ }
|
|
|
2260
|
+ }
|
|
|
2261
|
+ if(formName === "dealEditWorkForm"){
|
|
|
2262
|
+ if(this.dispatchhaocaiarrEdit.length>0){
|
|
|
2263
|
+ const index = this.dispatchhaocaiarrEdit.findIndex((o) => {
|
|
|
2264
|
+ return !o.F_ReceiveUser || !o.F_DicName || !o.F_Number;
|
|
|
2265
|
+ });
|
|
|
2266
|
+ if (index >= 0) {
|
|
|
2267
|
+ this.$message.error("请选择对应物资信息");
|
|
|
2268
|
+ return;
|
|
|
2269
|
+ }
|
|
|
2270
|
+ }
|
|
|
2271
|
+ }
|
|
2241
|
2272
|
if (formName === "zhddtransferForm") {
|
|
2242
|
2273
|
const arrlist = [];
|
|
2243
|
2274
|
this.xylxdatas.forEach(function (v, n) {
|