diff --git a/src/api/quote/quoteDetailAttribute.js b/src/api/quote/quoteDetailAttribute.js
index 4b42a06..738bea9 100644
--- a/src/api/quote/quoteDetailAttribute.js
+++ b/src/api/quote/quoteDetailAttribute.js
@@ -5,5 +5,7 @@ export const queryQuoteDetailAttribute = (data) => createAPI(`/quote/detail/attr
export const queryQuoteDetailAttributeItem = (data) => createAPI(`/quote/detail/attribute/item`,'post',data)
export const batchUpdateDetailAttribute = (data) => createAPI(`/quote/detail/attribute/batch/update`,'post',data)
+export const batchRemoveDetailAttribute = (data) => createAPI(`/quote/detail/attribute/batch/remove`,'post',data)
+export const batchSaveDetailAttribute = (data) => createAPI(`/quote/detail/attribute/batch/save`,'post',data)
diff --git a/src/views/modules/quote/detail/primary/quoteDetailCost.vue b/src/views/modules/quote/detail/primary/quoteDetailCost.vue
index dab3e3e..3b1e7cc 100644
--- a/src/views/modules/quote/detail/primary/quoteDetailCost.vue
+++ b/src/views/modules/quote/detail/primary/quoteDetailCost.vue
@@ -81,6 +81,9 @@ export default {
if (data && data.code === 0){
this.quoteDetail.toolCost = data.row.toolCost;
this.quoteDetail.adjustToolCost = data.row.toolCost;
+ this.quoteDetail.packCost = data.row.packCost;
+ this.quoteDetail.shippingCost = data.row.shippingCost;
+ this.quoteDetail.otherCost = data.row.otherCost;
}else {
this.$message.warning(data.msg);
}
@@ -236,18 +239,18 @@ export default {
v-model="quoteDetail.manageCost" :step="0" :precision="4" :min="0"/>
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
import {
+ batchRemoveDetailAttribute, batchSaveDetailAttribute,
batchUpdateDetailAttribute,
queryQuoteDetailAttribute,
queryQuoteDetailAttributeItem
@@ -131,8 +132,13 @@ export default {
return
}
// 保存属性
- // console.log(this.dataList)
- batchUpdateDetailAttribute(this.dataList).then(({data})=>{
+ let params = this.dataList.map(item => {
+ return{
+ ...item,
+ updateBy: this.$store.state.user.name,
+ }
+ })
+ batchUpdateDetailAttribute(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.handleQueryOther();
@@ -182,6 +188,46 @@ export default {
handleItemSelectionChange(val){
this.selectionList = val;
},
+ handleAddAttribute(){
+ if (this.selectionList.length === 0){
+ this.$message.warning("请先选择属性");
+ return
+ }
+ let params = this.selectionList.map(item => {
+ return{
+ ...item,
+ createBy: this.$store.state.user.name,
+ }
+ })
+ batchSaveDetailAttribute(params).then(({data})=>{
+ if (data && data.code === 0) {
+ this.$message.success(data.msg);
+ this.handleQueryOther();
+ this.handleQueryAttributeItem();
+ }else {
+ this.$message.warning(data.msg);
+ }
+ }).catch((error)=>{
+ this.$message.error(error);
+ })
+ },
+ handleRemoveAttribute(){
+ if (this.selectionDataList.length === 0){
+ this.$message.warning("请先选择属性");
+ return
+ }
+ batchRemoveDetailAttribute(this.selectionDataList).then(({data})=>{
+ if (data && data.code === 0){
+ this.$message.success(data.msg);
+ this.handleQueryOther();
+ this.handleQueryAttributeItem();
+ }else {
+ this.$message.warning(data.msg);
+ }
+ }).catch((error)=>{
+ this.$message.error(error);
+ })
+ },
},
created() {
if (this.quoteDetail && this.quoteDetail.id){
@@ -289,10 +335,10 @@ export default {
- 添加>>
+ 添加>>
- 删除<<
+ 删除<<