|
|
@@ -52,7 +52,8 @@
|
|
|
<span v-if="showFlagBtn">
|
|
|
<el-button v-if="item.flag==0 && mode=='view'" type="success" size="mini" style="margin-right: 20px" @click="handleFlag(item, index)">待标记</el-button>
|
|
|
<el-button v-if="item.flag==1 && mode=='view'" type="warning" size="mini" style="margin-right: 5px" @click="handleFlag(item, index)">已标记</el-button>
|
|
|
- <el-button v-if="mode==='choose'" type="text" size="mini" @click="openAddToCardLibDialog(item)">加入图集</el-button>
|
|
|
+<!-- <el-button v-if="mode==='choose'" type="text" size="mini" @click="openAddToCardLibDialog(item)">加入清单</el-button>-->
|
|
|
+ <el-button v-if="mode==='choose'" type="text" size="mini" @click="openAddToCardUserPurchaseDialog(item)">加入清单</el-button>
|
|
|
<el-button v-if="mode=='view'" type="text" size="mini" @click="openOrgPicForm(item, index)">原图</el-button>
|
|
|
<el-button v-if="mode=='view' && (orderItem.prodName.indexOf('简约') !== -1 || orderItem.prodName.indexOf('高阶') !== -1)" type="text" size="mini" @click="openCanvasParamPicForm(item, index)">工艺</el-button>
|
|
|
<el-button v-if="(item.prodName.indexOf('语音') !== -1 || item.prodName.toLowerCase().indexOf('ar') !== -1) && mode=='view'" type="text" size="mini" @click="openYYForm(item, index)">查看语音</el-button>
|
|
|
@@ -135,6 +136,68 @@
|
|
|
<el-button :loading="addToCardLibLoading" class="default-btn primary-btn" type="primary" @click="addToCardLibSubmit()">{{$t("crud.filter.submitBtn")}}</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="加入清单" :visible.sync="addToCardUserPurchaseVisible" :modal="false" width="80%">
|
|
|
+ <el-form
|
|
|
+ :model="userPurchaseDataForm"
|
|
|
+ size="small"
|
|
|
+ ref="dataForm"
|
|
|
+ label-width="80px">
|
|
|
+ <el-form-item prop="seriesId" label="清单名称">
|
|
|
+ <el-select v-model="userPurchaseDataForm.cardUserPurchaseId" clearable filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="node in userPurchaseList"
|
|
|
+ :key="node.id"
|
|
|
+ :label="node.cardName"
|
|
|
+ :value="node.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="seriesId" label="团队组合">
|
|
|
+ <el-select v-model="userPurchaseDataForm.seriesId" clearable filterable @change="selectSeries">
|
|
|
+ <el-option
|
|
|
+ v-for="node in seriesList"
|
|
|
+ :key="node.seriesId"
|
|
|
+ :label="node.seriesName"
|
|
|
+ :value="node.seriesId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="personId" label="成员名称" class="search-form-item">
|
|
|
+ <el-select v-model="userPurchaseDataForm.personId" placeholder="请选择爱豆" clearable filterable>
|
|
|
+ <el-option v-for="person in personList" :label="person.personName" :value="person.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <div class="create-card-lib" v-for="(card, index) in userPurchaseDataForm.orderCardItemList" :key="index">
|
|
|
+ <el-row :gutter="12" style="padding-top: 5px">
|
|
|
+ <span class="num">{{card.num}}</span>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card :body-style="{ padding: '0px' }">
|
|
|
+ <div style="padding: 3px; text-align: center">
|
|
|
+ <span>正面</span>
|
|
|
+ </div>
|
|
|
+ <div style="width: 100px;height: auto">
|
|
|
+ <img :src="resourcesUrl + card.frontPic"/>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card :body-style="{ padding: '0px' }">
|
|
|
+ <div style="padding: 3px; text-align: center">
|
|
|
+ <span>背面</span>
|
|
|
+ </div>
|
|
|
+ <div style="width: 100px;height: auto">
|
|
|
+ <img :src="resourcesUrl + card.backPic"/>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button class="default-btn">{{$t("crud.filter.cancelBtn")}}</el-button>
|
|
|
+ <el-button :loading="addToCardUserPurchaseLoading" class="default-btn primary-btn" type="primary" @click="addToCardUserPurchaseSubmit()">{{$t("crud.filter.submitBtn")}}</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -148,6 +211,9 @@
|
|
|
components: {CanvasPreview, YuyinPreview,OrgPicPreview, CanvasParamPicPreview},
|
|
|
data () {
|
|
|
return {
|
|
|
+ userPurchaseList: [],
|
|
|
+ userPurchaseDataForm: {},
|
|
|
+ addToCardUserPurchaseVisible: false,
|
|
|
shopId: this.$store.state.user.shopId,
|
|
|
lang: localStorage.getItem('lang') || 'zh_CN',
|
|
|
cardItemList:[],
|
|
|
@@ -162,6 +228,7 @@
|
|
|
previewHeight: 0,
|
|
|
bloodWidth: 0,
|
|
|
addToCardLibLoading: false,
|
|
|
+ addToCardUserPurchaseLoading: false,
|
|
|
cardLibItemDataForm:{},
|
|
|
addToCardLibVisible: false,
|
|
|
seriesList:[],
|
|
|
@@ -199,7 +266,6 @@
|
|
|
method: 'POST',
|
|
|
data: this.cardLibItemDataForm
|
|
|
}).then(({data}) => {
|
|
|
- this.addToCardLibLoading = false
|
|
|
this.$message({
|
|
|
message: '加入成功',
|
|
|
type: 'success',
|
|
|
@@ -212,6 +278,39 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ addToCardUserPurchaseSubmit(){
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl('/prod/orderCardItem/addToCardUserPurchase'),
|
|
|
+ method: 'POST',
|
|
|
+ data: this.userPurchaseDataForm
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.$message({
|
|
|
+ message: '加入成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 300,
|
|
|
+ onClose: () => {
|
|
|
+ this.addToCardUserPurchaseLoading = false
|
|
|
+ this.userPurchaseDataForm = {}
|
|
|
+ this.addToCardUserPurchaseVisible = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getCardUserPurchaseList(){
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl('/card/cardUserPurchase/page'),
|
|
|
+ method: 'get',
|
|
|
+ params: this.$http.adornParams(
|
|
|
+ Object.assign({
|
|
|
+ size: 100,
|
|
|
+ shopId: 1
|
|
|
+ },
|
|
|
+ )
|
|
|
+ )
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.userPurchaseList = data.records
|
|
|
+ })
|
|
|
+ },
|
|
|
getSeriesList () {
|
|
|
this.$http({
|
|
|
url: this.$http.adornUrl('/prod/prodTemplateSeries/page'),
|
|
|
@@ -252,6 +351,13 @@
|
|
|
this.addToCardLibVisible = true
|
|
|
this.getSeriesList()
|
|
|
},
|
|
|
+ openAddToCardUserPurchaseDialog(cardItem){
|
|
|
+ let addToCardUserPurchaseList = this.cardItemList.filter(item => item.isSelected === true)
|
|
|
+ this.userPurchaseDataForm.orderCardItemList = addToCardUserPurchaseList
|
|
|
+ this.addToCardUserPurchaseVisible = true
|
|
|
+ this.getCardUserPurchaseList()
|
|
|
+ this.getSeriesList()
|
|
|
+ },
|
|
|
openCanvasParamPicForm(item, index){
|
|
|
this.$nextTick(() =>{
|
|
|
this.$refs.canvasParamPicPreviewRef.init(item)
|