|
@@ -51,6 +51,11 @@
|
|
|
size="small"
|
|
|
@click="openAuditBox(scope.row.id)"
|
|
|
>审核</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="copyGoods(scope.row.id)"
|
|
|
+ >复制</el-button>
|
|
|
</template>
|
|
|
|
|
|
|
|
@@ -138,7 +143,7 @@
|
|
|
|
|
|
|
|
|
<script>
|
|
|
- import {getList, getDetail, add, update, remove, modifyState, audit} from "@/api/mall/goodsinfo";
|
|
|
+ import {getList, getDetail, add, update, remove, modifyState, audit, copy} from "@/api/mall/goodsinfo";
|
|
|
import {mapGetters} from "vuex";
|
|
|
import {getByParentId} from "../../api/mall/categoryinfo";
|
|
|
import {getList as getStoreList} from "@/api/mall/store";
|
|
@@ -329,8 +334,8 @@
|
|
|
// },{ validator: validatePass, trigger: 'blur' }],
|
|
|
// },
|
|
|
{
|
|
|
- label: "售价",
|
|
|
- prop: "discountPrice",
|
|
|
+ label: "供货价",
|
|
|
+ prop: "costPrice",
|
|
|
precision: 2,
|
|
|
type: "number",
|
|
|
formatter:(val,value)=>{
|
|
@@ -338,7 +343,7 @@
|
|
|
},
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
- message: "请输入售价",
|
|
|
+ message: "请输入供货价",
|
|
|
trigger: "blur"
|
|
|
}],
|
|
|
},
|
|
@@ -458,8 +463,8 @@
|
|
|
listType: 'picture-img',
|
|
|
loadText: '上传中,请稍等',
|
|
|
accept: 'image/png, image/jpeg',
|
|
|
- fileSize: 1024,
|
|
|
- tip: '只能上传jpg/png文件,且不超过1M',
|
|
|
+ fileSize: 500,
|
|
|
+ tip: '只能上传jpg/png文件,且不超过500M',
|
|
|
span: 24,
|
|
|
hide: true,
|
|
|
propsHttp: {
|
|
@@ -885,6 +890,15 @@
|
|
|
},
|
|
|
downloadFile() {
|
|
|
window.location.href="http://www.gzzzyd.com/groupon/template.xlsx"
|
|
|
+ },
|
|
|
+ copyGoods(goodsId) {
|
|
|
+ copy(goodsId).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "复制成功"
|
|
|
+ });
|
|
|
+ this.onLoad(this.page);
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
};
|