|
@@ -35,6 +35,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="19">
|
|
<el-col :span="19">
|
|
|
|
|
+ <el-button @click="delProductAll" type="primary" size="small">一键删除</el-button>
|
|
|
<el-button v-if="!isDisabled" :type="itemsPro.length > 0?'primary':''" size="small" @click="delProducts" class="inline-16" :disabled="itemsPro.length === 0">删 除</el-button>
|
|
<el-button v-if="!isDisabled" :type="itemsPro.length > 0?'primary':''" size="small" @click="delProducts" class="inline-16" :disabled="itemsPro.length === 0">删 除</el-button>
|
|
|
<el-input style="width:200px;" placeholder="搜索" :suffix-icon="productParam.content.where.condition?productParam.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="productParam.content.where.condition" @keyup.native.enter="listData(productParam.content.pageNumber = 1)" @clear="listData(productParam.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
|
|
<el-input style="width:200px;" placeholder="搜索" :suffix-icon="productParam.content.where.condition?productParam.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="productParam.content.where.condition" @keyup.native.enter="listData(productParam.content.pageNumber = 1)" @clear="listData(productParam.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
|
|
|
</el-input>
|
|
</el-input>
|
|
@@ -94,7 +95,7 @@
|
|
|
append-to-body
|
|
append-to-body
|
|
|
>
|
|
>
|
|
|
<addProduct ref="productRef" :params="paramProduct" :tablecolsAdd="tablecolsAdd" :querySa_brandid="brandid"
|
|
<addProduct ref="productRef" :params="paramProduct" :tablecolsAdd="tablecolsAdd" :querySa_brandid="brandid"
|
|
|
- :tradefield="tradefield" @addProduct="addProduct" @addSuccess="addProducts"></addProduct>
|
|
|
|
|
|
|
+ :tradefield="tradefield" @uploadData="uploadDataProduct" @onSuccess="onSuccess" @addProduct="addProduct" @addSuccess="addProducts"></addProduct>
|
|
|
</el-drawer>
|
|
</el-drawer>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -132,6 +133,7 @@ export default {
|
|
|
projectParam:{
|
|
projectParam:{
|
|
|
"id": 20230705144904,
|
|
"id": 20230705144904,
|
|
|
"content": {
|
|
"content": {
|
|
|
|
|
+ "nocache":true,
|
|
|
"sa_salesforecastbillid":this.id,
|
|
"sa_salesforecastbillid":this.id,
|
|
|
"pageNumber": 1,
|
|
"pageNumber": 1,
|
|
|
"pageSize": 20,
|
|
"pageSize": 20,
|
|
@@ -143,6 +145,7 @@ export default {
|
|
|
productParam:{
|
|
productParam:{
|
|
|
"id": 20230705145004,
|
|
"id": 20230705145004,
|
|
|
"content": {
|
|
"content": {
|
|
|
|
|
+ "nocache":true,
|
|
|
"sa_salesforecastprojectid": '',
|
|
"sa_salesforecastprojectid": '',
|
|
|
"pageNumber": 1,
|
|
"pageNumber": 1,
|
|
|
"pageSize": 20,
|
|
"pageSize": 20,
|
|
@@ -331,8 +334,9 @@ export default {
|
|
|
})
|
|
})
|
|
|
this.tool.showMessage(res,()=>{
|
|
this.tool.showMessage(res,()=>{
|
|
|
this.items = []
|
|
this.items = []
|
|
|
- this.projectParam.content.pageNumber = 1
|
|
|
|
|
- this.listData()
|
|
|
|
|
|
|
+ /*this.projectParam.content.pageNumber = 1
|
|
|
|
|
+ this.listData()*/
|
|
|
|
|
+ this.onSuccess()
|
|
|
})
|
|
})
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
this.$message({
|
|
@@ -413,7 +417,53 @@ export default {
|
|
|
this.onSuccess()
|
|
this.onSuccess()
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+ /*一键全选产品*/
|
|
|
|
|
+ uploadDataProduct(uploadApi,data){
|
|
|
|
|
+ console.log(data)
|
|
|
|
|
+ uploadApi.id = 20230705145204
|
|
|
|
|
+ uploadApi.content = {
|
|
|
|
|
+ "sa_salesforecastbillid": this.id, //订单ID
|
|
|
|
|
+ "sa_salesforecastprojectid": this.selectProject,
|
|
|
|
|
+ "salesforecast": data.map(item=>{
|
|
|
|
|
+ return {
|
|
|
|
|
+ "itemid": item.itemid,
|
|
|
|
|
+ "orderqty": item.qty,
|
|
|
|
|
+ "orderamount": (item.marketprice * (this.discountrate /100))*item.qty,
|
|
|
|
|
+ "price": item.marketprice * (this.discountrate /100),
|
|
|
|
|
+ "sa_salesforecastid":0
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ /*一键删除产品*/
|
|
|
|
|
+ delProductAll(){
|
|
|
|
|
+ this.$confirm('此操作将删除全部产品, 是否继续?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(async() => {
|
|
|
|
|
+ const res = await this.$api.requested({
|
|
|
|
|
+ "id": 20230705145404,
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "sa_salesforecastbillid":this.id,
|
|
|
|
|
+ "sa_salesforecastprojectid":this.selectProject,
|
|
|
|
|
+ "sa_salesforecastids":[],
|
|
|
|
|
+ "isAll":1,
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
|
|
+ this.items = []
|
|
|
|
|
+ /*this.projectParam.content.pageNumber = 1
|
|
|
|
|
+ this.listData()*/
|
|
|
|
|
+ this.onSuccess()
|
|
|
|
|
+ })
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'info',
|
|
|
|
|
+ message: '已取消删除'
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
/*删除商品*/
|
|
/*删除商品*/
|
|
|
async delProduct(val){
|
|
async delProduct(val){
|
|
|
console.log(val)
|
|
console.log(val)
|
|
@@ -421,6 +471,7 @@ export default {
|
|
|
"id": 20230705145404,
|
|
"id": 20230705145404,
|
|
|
"content": {
|
|
"content": {
|
|
|
"sa_salesforecastbillid":this.id,
|
|
"sa_salesforecastbillid":this.id,
|
|
|
|
|
+ "sa_salesforecastprojectid":this.selectProjectid,
|
|
|
"sa_salesforecastids":[val.sa_salesforecastid]
|
|
"sa_salesforecastids":[val.sa_salesforecastid]
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -438,6 +489,7 @@ export default {
|
|
|
"id": 20230705145404,
|
|
"id": 20230705145404,
|
|
|
"content": {
|
|
"content": {
|
|
|
"sa_salesforecastbillid":this.id,
|
|
"sa_salesforecastbillid":this.id,
|
|
|
|
|
+ "sa_salesforecastprojectid":this.selectProjectid,
|
|
|
"sa_salesforecastids":ids
|
|
"sa_salesforecastids":ids
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -448,6 +500,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
onSuccess(){
|
|
onSuccess(){
|
|
|
|
|
+ this.dialogVisible = false
|
|
|
this.projectData()
|
|
this.projectData()
|
|
|
this.$emit('onSuccess')
|
|
this.$emit('onSuccess')
|
|
|
},
|
|
},
|