|  | @@ -44,9 +44,9 @@
 | 
	
		
			
				|  |  |                  />
 | 
	
		
			
				|  |  |                </el-select>
 | 
	
		
			
				|  |  |              </el-form-item>
 | 
	
		
			
				|  |  | -            <el-form-item label="票务选择" prop="ticketIdList">
 | 
	
		
			
				|  |  | +            <el-form-item label="票务选择" prop="goodsIdList">
 | 
	
		
			
				|  |  |                <el-select
 | 
	
		
			
				|  |  | -                v-model="form.ticketIdList"
 | 
	
		
			
				|  |  | +                v-model="form.goodsIdList"
 | 
	
		
			
				|  |  |                  placeholder="票务选择"
 | 
	
		
			
				|  |  |                  clearable
 | 
	
		
			
				|  |  |                  multiple
 | 
	
	
		
			
				|  | @@ -93,7 +93,7 @@
 | 
	
		
			
				|  |  |                <el-input
 | 
	
		
			
				|  |  |                  placeholder="演出时长"
 | 
	
		
			
				|  |  |                  type="number"
 | 
	
		
			
				|  |  | -                v-model.number="form.showDuration"
 | 
	
		
			
				|  |  | +                v-model="form.showDuration"
 | 
	
		
			
				|  |  |                  @change="changePriceAmount('showDuration')"
 | 
	
		
			
				|  |  |                  clearable
 | 
	
		
			
				|  |  |                  style="width: 240px;margin-right: 10px"
 | 
	
	
		
			
				|  | @@ -304,6 +304,7 @@ export default {
 | 
	
		
			
				|  |  |        rules: {
 | 
	
		
			
				|  |  |          name: [{ required: true, message: "请输入剧目名称", trigger: "blur" }],
 | 
	
		
			
				|  |  |          sponsorId: [{ required: true, message: "请选择主办方", trigger: "blur" }],
 | 
	
		
			
				|  |  | +        goodsIdList: [{ required: true, message: "请选择票务信息", trigger: "blur" }],
 | 
	
		
			
				|  |  |          status: [{ required: true, message: "请选择是否启用状态", trigger: "blur" }]
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        uploadObj: {
 | 
	
	
		
			
				|  | @@ -333,7 +334,7 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      /** 查询票务列表 */
 | 
	
		
			
				|  |  |      ticketPageListApi() {
 | 
	
		
			
				|  |  | -      ticketPageList({pageNum: 1, pageSize: 100, goodsType: 2, classifyId: 1, status: 1})
 | 
	
		
			
				|  |  | +      ticketPageList({pageNum: 1, pageSize: 100, goodsType: 2, classifyId: 1, status: 0})
 | 
	
		
			
				|  |  |          .then(response => {
 | 
	
		
			
				|  |  |              this.ticketList = response.data.rows;
 | 
	
		
			
				|  |  |            }
 | 
	
	
		
			
				|  | @@ -386,6 +387,11 @@ export default {
 | 
	
		
			
				|  |  |            this.$set(this.form, 'name', obj.name);
 | 
	
		
			
				|  |  |            this.$set(this.form, 'sponsorId', obj.sponsorId);
 | 
	
		
			
				|  |  |            this.$set(this.form, 'sponsorName', obj.sponsorName);
 | 
	
		
			
				|  |  | +          let goodsIdList = []
 | 
	
		
			
				|  |  | +          obj.goodsList.forEach(item => {
 | 
	
		
			
				|  |  | +            goodsIdList.push(item.goodsId);
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +          this.$set(this.form, 'goodsIdList', goodsIdList);
 | 
	
		
			
				|  |  |            this.$set(this.form, 'status', obj.status);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |            // 演出信息
 | 
	
	
		
			
				|  | @@ -413,16 +419,15 @@ export default {
 | 
	
		
			
				|  |  |      submitForm() {
 | 
	
		
			
				|  |  |        this.$refs["form"].validate(async (valid) => {
 | 
	
		
			
				|  |  |          if (valid) {
 | 
	
		
			
				|  |  | -          if(this.activeName == '02') {
 | 
	
		
			
				|  |  | -            if(this.form.photoList && this.form.photoList.length < 2) {
 | 
	
		
			
				|  |  | -              this.$message.success("上传的宣传图不能少于三张!");
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +          if(this.form.photoList && this.form.photoList.length < 3) {
 | 
	
		
			
				|  |  | +            this.$message.error("上传的宣传图不能少于三张!");
 | 
	
		
			
				|  |  | +            return false
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |            try {
 | 
	
		
			
				|  |  |              this.loading = true;
 | 
	
		
			
				|  |  |              const { code } = await saveAndEdit({ ...this.form });
 | 
	
		
			
				|  |  |              if (code === 200) {
 | 
	
		
			
				|  |  | -              this.$message.success("修改成功!");
 | 
	
		
			
				|  |  | +              this.$message.success("操作成功!");
 | 
	
		
			
				|  |  |                this.$emit("getList");
 | 
	
		
			
				|  |  |                this.cancel();
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -495,19 +500,25 @@ export default {
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      handleRemove(file, fileList) {
 | 
	
		
			
				|  |  | -      fileList.forEach(item => {
 | 
	
		
			
				|  |  | -        if(item.response && item.response.data){
 | 
	
		
			
				|  |  | -          let res = item.response.data;
 | 
	
		
			
				|  |  | -          let photo = {
 | 
	
		
			
				|  |  | -            imageUrl: res?.data?.url,
 | 
	
		
			
				|  |  | -            url: res?.data?.url,
 | 
	
		
			
				|  |  | -            photoType: '2'
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -          if(!this.form.photoList){
 | 
	
		
			
				|  |  | -            this.form.photoList = []
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -          // this.form.photoList.push(photo);
 | 
	
		
			
				|  |  | -          this.$set(this.form.photoList, this.form.photoList.length, photo);
 | 
	
		
			
				|  |  | +      // this.form.photoList = []
 | 
	
		
			
				|  |  | +      // fileList.forEach(item => {
 | 
	
		
			
				|  |  | +      //   if(item.response && item.response.data){
 | 
	
		
			
				|  |  | +      //     let res = item.response.data;
 | 
	
		
			
				|  |  | +      //     let photo = {
 | 
	
		
			
				|  |  | +      //       imageUrl: res?.data?.url,
 | 
	
		
			
				|  |  | +      //       url: res?.data?.url,
 | 
	
		
			
				|  |  | +      //       photoType: '2'
 | 
	
		
			
				|  |  | +      //     }
 | 
	
		
			
				|  |  | +      //     if(!this.form.photoList){
 | 
	
		
			
				|  |  | +      //       this.form.photoList = []
 | 
	
		
			
				|  |  | +      //     }
 | 
	
		
			
				|  |  | +      //     // this.form.photoList.push(photo);
 | 
	
		
			
				|  |  | +      //     this.$set(this.form.photoList, this.form.photoList.length, photo);
 | 
	
		
			
				|  |  | +      //   }
 | 
	
		
			
				|  |  | +      // })
 | 
	
		
			
				|  |  | +      this.form.photoList.forEach((item, index) => {
 | 
	
		
			
				|  |  | +        if(item.uid == file.uid){
 | 
	
		
			
				|  |  | +          this.form.photoList.splice(index, 1)
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 |