|
@@ -24,87 +24,64 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- bordered></s-table>
|
|
|
+ bordered>
|
|
|
+ <!-- 成本小计 -->
|
|
|
+ <template slot="costSubtotal" slot-scope="text, record">
|
|
|
+ <span>{{(record.putCost * record.putQty) || 0}}</span>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
</a-card>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { STable, VSelect } from '@/components'
|
|
|
- export default{
|
|
|
- components: { STable, VSelect },
|
|
|
- data(){
|
|
|
- return{
|
|
|
- queryParam: {
|
|
|
-
|
|
|
- },
|
|
|
- disabled: false, // 查询、重置按钮是否可操作
|
|
|
- brandData: [], // 产品品牌 下拉数据
|
|
|
- typeData: [], // 产品类别 下拉数据
|
|
|
- // 表头
|
|
|
- columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'creatDate', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'custNahme', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
|
- { title: '原厂编码', dataIndex: 'totalP', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '成本价', dataIndex: 'custsN2agme', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '调入数量', scopedSlots: { customRender: 'transferOutQuantity' }, align: 'center' },
|
|
|
- { title: '单位', dataIndex: 'custsNsagme', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '成本小计', dataIndex: 'custsNagme', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '仓库', dataIndex: 'warehouse', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '仓位', dataIndex: 'warehouseLoc', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
- ],
|
|
|
- // 加载数据方法 必须为 Promise 对象
|
|
|
- loadData: parameter => {
|
|
|
- this.disabled = true
|
|
|
- // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
- // const data = res.data
|
|
|
- // const no = (data.pageNo - 1) * data.pageSize
|
|
|
- // for (var i = 0; i < data.list.length; i++) {
|
|
|
- // data.list[i].no = no + i + 1
|
|
|
- // }
|
|
|
- // this.disabled = false
|
|
|
- // return data
|
|
|
- // })
|
|
|
- const _this = this
|
|
|
- return new Promise(function(resolve, reject){
|
|
|
- const data = {
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- list: [
|
|
|
- { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
- ],
|
|
|
- count: 10
|
|
|
- }
|
|
|
- const no = (data.pageNo - 1) * data.pageSize
|
|
|
- for (var i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].no = no + i + 1
|
|
|
- }
|
|
|
- _this.disabled = false
|
|
|
- resolve(data)
|
|
|
- })
|
|
|
- },
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- // 重置
|
|
|
- resetSearchForm () {
|
|
|
- this.queryParam.orderBundleNo = ''
|
|
|
- this.queryParam.orderBundle.custMobile = ''
|
|
|
- this.queryParam.bundleName = ''
|
|
|
- this.queryParam.itemName = ''
|
|
|
- this.oldTime = undefined
|
|
|
- this.newTime = undefined
|
|
|
- this.$refs.table.refresh(true)
|
|
|
- },
|
|
|
- // 提交
|
|
|
- handleSubmit(){},
|
|
|
- // 返回列表
|
|
|
- handleBack(){
|
|
|
+ import { allocLinkagePutDetailList } from '@/api/allocLinkagePut'
|
|
|
+ import { STable, VSelect } from '@/components'
|
|
|
+ export default{
|
|
|
+ components: { STable, VSelect },
|
|
|
+ data(){
|
|
|
+ return{
|
|
|
+ queryParam: {
|
|
|
+ allocationLinkagePutSn: this.$route.params.sn
|
|
|
+ },
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ brandData: [], // 产品品牌 下拉数据
|
|
|
+ typeData: [], // 产品类别 下拉数据
|
|
|
+ // 表头
|
|
|
+ columns: [
|
|
|
+ { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '成本价', dataIndex: 'putCost', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '调入数量', dataIndex: 'putQty', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '单位', dataIndex: 'productUnit', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '成本小计', scopedSlots: { customRender: 'costSubtotal' }, align: 'center' },
|
|
|
+ { title: '仓库', dataIndex: 'warehouseName', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '仓位', dataIndex: 'warehouseLocationName', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ ],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ return allocLinkagePutDetailList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
+ const data = res.data
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ this.disabled = false
|
|
|
+ return data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 返回列表
|
|
|
+ handleBack(){
|
|
|
this.$router.push({ path: '/allocationManagement/chainTransferIn/list'})
|
|
|
- },
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|