|
@@ -24,13 +24,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import {
|
|
|
|
- GetFacPricePageList,
|
|
|
|
- FacPriceAdd,
|
|
|
|
- FacPriceChange,
|
|
|
|
- FacPriceDelete,
|
|
|
|
- GetFactorySelectItem
|
|
|
|
-} from '@/api/baseData'
|
|
|
|
|
|
+
|
|
import MyTable from '_c/my-table/my-table'
|
|
import MyTable from '_c/my-table/my-table'
|
|
import MyModalForm from '_c/my-modal-form/my-modal-form'
|
|
import MyModalForm from '_c/my-modal-form/my-modal-form'
|
|
import MyForm from './my-form'
|
|
import MyForm from './my-form'
|
|
@@ -59,7 +53,7 @@ export default {
|
|
formConfig: [
|
|
formConfig: [
|
|
{
|
|
{
|
|
type: 'select',
|
|
type: 'select',
|
|
- key: 'facId',
|
|
|
|
|
|
+ key: 'supplierId',
|
|
label: '供应商',
|
|
label: '供应商',
|
|
list: []
|
|
list: []
|
|
},
|
|
},
|
|
@@ -246,16 +240,6 @@ export default {
|
|
},
|
|
},
|
|
on: {
|
|
on: {
|
|
click: () => {
|
|
click: () => {
|
|
- // for (const key in params.row) {
|
|
|
|
- // this.formData[key] = params.row[key]
|
|
|
|
- // }
|
|
|
|
- // this.formData.code = params.row.materialCode
|
|
|
|
- // this.formData.name = params.row.materialName
|
|
|
|
- // this.formData.applyUser = this.$store.state.user.name
|
|
|
|
- // this.formData.applyDateTime = this.$dayjs().format('YYYY-MM-DD')
|
|
|
|
- // // this.formData.name = params.row.materialName
|
|
|
|
- // // this.$set(this.formData, 'applyUser', this.$store.state.user.name)
|
|
|
|
- // this.formType = 'edit'
|
|
|
|
this.formData = { ...params.row }
|
|
this.formData = { ...params.row }
|
|
this.updShow = true
|
|
this.updShow = true
|
|
}
|
|
}
|
|
@@ -276,10 +260,10 @@ export default {
|
|
this.$MyModal
|
|
this.$MyModal
|
|
.show({ text: '是否删除?' })
|
|
.show({ text: '是否删除?' })
|
|
.$on('confirm', () => {
|
|
.$on('confirm', () => {
|
|
- FacPriceDelete({
|
|
|
|
- id: params.row.id
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
|
+ this.$post('/api/storage-restructure/supplierPrice/delete',{
|
|
|
|
+ id:params.row.id
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ if(res.code == 200){
|
|
this.$Message.info(res.msg)
|
|
this.$Message.info(res.msg)
|
|
this.getList()
|
|
this.getList()
|
|
}
|
|
}
|
|
@@ -297,7 +281,7 @@ export default {
|
|
tableFilter: [
|
|
tableFilter: [
|
|
{
|
|
{
|
|
name: 'Input',
|
|
name: 'Input',
|
|
- value: 'key',
|
|
|
|
|
|
+ value: 'keyword',
|
|
placeholder: '请输入关键字'
|
|
placeholder: '请输入关键字'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -336,28 +320,33 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
cfm (type, formData) {
|
|
cfm (type, formData) {
|
|
|
|
+ console.log(formData)
|
|
if (type === 'add') {
|
|
if (type === 'add') {
|
|
- FacPriceAdd({
|
|
|
|
- ...formData,
|
|
|
|
- materialCode: formData.code
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
|
+ this.$post('/api/storage-restructure/supplierPrice/add',{
|
|
|
|
+ supplierId:formData.supplierId,
|
|
|
|
+ materialId:formData.id,
|
|
|
|
+ price:formData.price
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ if(res.code == 200){
|
|
this.show = false
|
|
this.show = false
|
|
this.$Message.info(res.msg)
|
|
this.$Message.info(res.msg)
|
|
this.getList()
|
|
this.getList()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+
|
|
} else if (type === 'edit') {
|
|
} else if (type === 'edit') {
|
|
- FacPriceChange({
|
|
|
|
- ...formData,
|
|
|
|
- factoryPriceId: formData.id
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.code === 0) {
|
|
|
|
|
|
+ this.$post('/api/storage-restructure/supplierPrice/updateFlowCreate',{
|
|
|
|
+ id:formData.factoryPriceId,
|
|
|
|
+ remarks:formData.remark,
|
|
|
|
+ price:formData.price
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ if(res.code == 200){
|
|
this.updShow = false
|
|
this.updShow = false
|
|
this.$Message.info(res.msg)
|
|
this.$Message.info(res.msg)
|
|
this.getList()
|
|
this.getList()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 检索条件事件处理
|
|
// 检索条件事件处理
|
|
@@ -376,7 +365,7 @@ export default {
|
|
this.$router.go(-1)
|
|
this.$router.go(-1)
|
|
break
|
|
break
|
|
case 'export':
|
|
case 'export':
|
|
- this.$post('/api/storage-restructure/supplierPrice/list',{
|
|
|
|
|
|
+ this.$post('/api/storage-restructure/supplierPrice/page',{
|
|
pageNum:1,
|
|
pageNum:1,
|
|
pageSize:500,
|
|
pageSize:500,
|
|
}).then(res=>{
|
|
}).then(res=>{
|
|
@@ -416,10 +405,11 @@ export default {
|
|
pageSize: 500,
|
|
pageSize: 500,
|
|
}).then(res=>{
|
|
}).then(res=>{
|
|
|
|
|
|
- this.formConfig[0].list = res.result.map(item => {
|
|
|
|
|
|
+ this.formConfig[0].list = res.data.records.map(item => {
|
|
return {
|
|
return {
|
|
...item,
|
|
...item,
|
|
- label: item.text
|
|
|
|
|
|
+ label: item.supplierName,
|
|
|
|
+ value:item.id
|
|
}
|
|
}
|
|
})
|
|
})
|
|
console.log(res)
|
|
console.log(res)
|